chore: flake wip

This commit is contained in:
C4illin 2025-05-15 22:11:30 +02:00
parent 74df47531c
commit bba420386f
2 changed files with 44 additions and 45 deletions

View file

@ -8,8 +8,7 @@
outputs = { self, nixpkgs, flake-utils, ... }: outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let pkgs = import nixpkgs { inherit system; };
pkgs = import nixpkgs { inherit system; };
appSrc = ./.; appSrc = ./.;
app = pkgs.dockerTools.buildLayeredImage { app = pkgs.dockerTools.buildLayeredImage {
@ -49,14 +48,13 @@
extraCommands = '' extraCommands = ''
export PATH=${pkgs.bun}/bin:$PATH export PATH=${pkgs.bun}/bin:$PATH
mkdir -p app mkdir -p /app
cp -r ${appSrc}/* app/ cp -r ${./dist}/* /app/
cd app
bun install --frozen-lockfile --production
bun run build
''; '';
}; };
in { in {
packages.default = app; packages.default = app;
}); }
);
} }

View file

@ -4,6 +4,7 @@
"scripts": { "scripts": {
"dev": "bun run --watch src/index.tsx", "dev": "bun run --watch src/index.tsx",
"hot": "bun run --hot src/index.tsx", "hot": "bun run --hot src/index.tsx",
"start": "bun run src/index.tsx",
"format": "eslint --fix .", "format": "eslint --fix .",
"build": "bunx @tailwindcss/cli -i ./src/main.css -o ./public/generated.css", "build": "bunx @tailwindcss/cli -i ./src/main.css -o ./public/generated.css",
"lint": "run-p 'lint:*'", "lint": "run-p 'lint:*'",