m
This commit is contained in:
parent
f81d5604ae
commit
d88355267a
4 changed files with 60 additions and 73 deletions
|
|
@ -22,12 +22,12 @@ This repo uses Bun as the package manager and `bun2nix` for reproducible Nix bui
|
|||
- `bun.lock` is the source of truth for JS dependencies.
|
||||
- `bun.nix` is generated from `bun.lock` with `bun run update:bun-nix`.
|
||||
- `flake.nix` imports the `bun2nix` overlay and exposes `packages.<system>.default` plus `nixosModules.default`.
|
||||
- `nix/package.nix` uses `bun2nix.fetchBunDeps` with `bun.nix`, runs `bun run build`, and installs the bundled `server.js` plus frontend assets as the `leo-ed` executable.
|
||||
- `nix/package.nix` uses `bun2nix.fetchBunDeps` with `bun.nix`, runs `bun run build`, and installs the bundled `server.js` plus frontend assets as the `kotsukotsu` executable.
|
||||
|
||||
Whenever dependencies change, update both `bun.lock` and `bun.nix` in the same commit. CI checks that `bun.nix` matches the lockfile by regenerating it and failing on diff.
|
||||
|
||||
## Server and Deployment Model
|
||||
This repo is the application source, not the full server configuration. Production is intended to be managed from a separate NixOS infra repo that imports this flake and sets `services.leo-ed.package = inputs.leo-ed.packages.${pkgs.system}.default;`. The included module in `nix/module.nix` defines the systemd service, runtime env (`APP_ORIGIN`, `PORT`, `SQLITE_PATH`, `SESSION_COOKIE_SECURE`), and persistent state directory.
|
||||
This repo is the application source, not the full server configuration. Production is intended to be managed from a separate NixOS infra repo that imports this flake and sets `services.kotsukotsu.package = inputs.kotsukotsu.packages.${pkgs.system}.default;`. The included module in `nix/module.nix` defines the systemd service, runtime env (`APP_ORIGIN`, `PORT`, `SQLITE_PATH`, `SESSION_COOKIE_SECURE`), and persistent state directory.
|
||||
|
||||
`server/config.ts` exists so production behavior is explicit: WebAuthn origin/RP ID, SQLite path, bind host, and secure cookies should come from NixOS service configuration, not reverse-proxy accident.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue