Finding
The NixOS module (nix/module.nix) and flake cannot boot a real harmonia instance — verified against the tree, several independent breaks.
Evidence
- Secrets mechanism is inert: the module sets
HARMONIA_SECRETS_PATH via LoadCredential, but no Rust code reads that variable (repo-wide grep: only nix/module.nix + docs reference it). secrets.toml is resolved as a sibling of the config file (crates/horismos/src/secrets.rs:4-9), which the module places in the read-only Nix store — so there is no working path to supply the REQUIRED exousia.jwt_secret except raw HARMONIA__EXOUSIA__JWT_SECRET, which the module does not plumb. A fresh instance will not start (jwt_secret is a hard boot validation).
ReadWritePaths omits ergasia.download_dir (and komide.podcast_dir); with ProtectSystem=strict, validate_download_dir (crates/archon/src/serve.rs:2426-2456) fails → boot fails even with valid config.
nix/tests/module-test.nix asserts the service comes up with settings that cannot pass validation (no jwt_secret, no download dir) — the flake check must fail if ever run.
- No
flake.lock is committed and no .github/workflows/ job runs any nix build/check — nothing exercises the flake, so the breaks went unnoticed.
docs/nix-deployment.md full-config example is invalid against the schema (media_type = "audiobook" — enum is music|video|book; epignosis.musicbrainz_user_agent — field does not exist, deny_unknown_fields → parse error).
Why this matters
Deployment packaging is a step on the path to a usable instance. The module presents as the fleet-proper deploy unit but cannot produce a booting service; anyone following it hits a wall, and the missing flake.lock + nix CI mean it silently rots. A plain systemd unit + config works today (the HTTP acquisition loop is functional on origin/main), so this blocks the declarative deploy, not all deploys.
Desired correction
- Honor
HARMONIA_SECRETS_PATH in horismos (read the credential file as the secrets source), or plumb HARMONIA__EXOUSIA__JWT_SECRET from the module.
- Extend
ReadWritePaths from ergasia.download_dir + komide.podcast_dir.
- Fix
module-test.nix to a config that actually validates (jwt_secret + a writable download dir); commit flake.lock; add a nix build/check CI job so the module cannot re-rot.
- Correct
docs/nix-deployment.md against the real schema.
Done when: nixos-rebuild/the flake check boots a harmonia service that passes config validation, in CI.
Finding
The NixOS module (
nix/module.nix) and flake cannot boot a real harmonia instance — verified against the tree, several independent breaks.Evidence
HARMONIA_SECRETS_PATHvia LoadCredential, but no Rust code reads that variable (repo-wide grep: onlynix/module.nix+ docs reference it).secrets.tomlis resolved as a sibling of the config file (crates/horismos/src/secrets.rs:4-9), which the module places in the read-only Nix store — so there is no working path to supply the REQUIREDexousia.jwt_secretexcept rawHARMONIA__EXOUSIA__JWT_SECRET, which the module does not plumb. A fresh instance will not start (jwt_secret is a hard boot validation).ReadWritePathsomitsergasia.download_dir(andkomide.podcast_dir); withProtectSystem=strict,validate_download_dir(crates/archon/src/serve.rs:2426-2456) fails → boot fails even with valid config.nix/tests/module-test.nixasserts the service comes up with settings that cannot pass validation (no jwt_secret, no download dir) — the flake check must fail if ever run.flake.lockis committed and no.github/workflows/job runs any nix build/check — nothing exercises the flake, so the breaks went unnoticed.docs/nix-deployment.mdfull-config example is invalid against the schema (media_type = "audiobook"— enum is music|video|book;epignosis.musicbrainz_user_agent— field does not exist,deny_unknown_fields→ parse error).Why this matters
Deployment packaging is a step on the path to a usable instance. The module presents as the fleet-proper deploy unit but cannot produce a booting service; anyone following it hits a wall, and the missing flake.lock + nix CI mean it silently rots. A plain systemd unit + config works today (the HTTP acquisition loop is functional on origin/main), so this blocks the declarative deploy, not all deploys.
Desired correction
HARMONIA_SECRETS_PATHin horismos (read the credential file as the secrets source), or plumbHARMONIA__EXOUSIA__JWT_SECRETfrom the module.ReadWritePathsfromergasia.download_dir+komide.podcast_dir.module-test.nixto a config that actually validates (jwt_secret + a writable download dir); commitflake.lock; add a nix build/check CI job so the module cannot re-rot.docs/nix-deployment.mdagainst the real schema.Done when:
nixos-rebuild/the flake check boots a harmonia service that passes config validation, in CI.