WS-H: NixOS module, VM test, README section
Module: Origin/Host allowlists from allowedHosts and the FQDN, credentials refreshed on reload so SIGHUP rotates the TLS cert, string cert/key paths kept out of the store, docker.enable asserts virtualisation.docker. VM test covers healthz, 401, token mint/revoke via sudo -u, /mcp, Origin 403, root refusal and a TLS node. Package skips two unit tests that need host state the sandbox lacks. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017WMgwyHQQU9cB4ruRDrKow
This commit is contained in:
1 parent
46b4f5ac0b
commit
34da657fdf
6 files changed
+193
-16
No files matched your search
@@ -116,14 +116,14 @@ Design: [`plan.md`](plan.md) · Review fixes: [`plan/review.md`](plan/review.md)
|
||||
- [x] **T8** Live check with `curl --cacert` and an `/mcp` initialize over HTTPS
|
||||
|
||||
### WS-H NixOS · [card](plan/workstreams/WS-H-nixos.md)
|
||||
- [ ] **H1** `nix/package.nix`: `buildRustPackage` from `Cargo.lock` with pkg-config, cmake, systemd. Binary `slinuxm`.
|
||||
- [ ] **H2** `flake.nix` with `packages.default`, `nixosModules.default` and `checks`
|
||||
- [ ] **H3** `nix/module.nix` options: `enable`, `package`, `port` (default 1984), `bind` (default loopback), `tls.*`, `openFirewall`, `allowedHosts`, `docker.enable`, `settings`, `environmentFile`
|
||||
- [ ] **H4** Service: dedicated user, `StateDirectory` 0700, `systemd-journal` group, P3 hardening set, config at `/etc/skyg-linux-tracker.toml`
|
||||
- [ ] **H5** **CLI installed system-wide**, plain binary (DEC-10). Token commands refuse to run as root against another user's DB and print the `sudo -u skyg-linux-tracker …` command.
|
||||
- [ ] **H6** Firewall: global `openFirewall` plus interface-scoped option. Eval assertion: non-loopback bind requires auth.
|
||||
- [ ] **H7** README NixOS section: flake input, token workflow, exposure model, `allowedHosts`
|
||||
- [ ] **H8** NixOS VM test: healthz, 401, mint token via CLI (`sudo -u`), 200, `/mcp`, revoke, 401, bad Origin 403, plus a TLS case
|
||||
- [x] **H1** `nix/package.nix`: `buildRustPackage` from `Cargo.lock` with pkg-config, cmake, systemd. Binary `slinuxm`.
|
||||
- [x] **H2** `flake.nix` with `packages.default`, `nixosModules.default` and `checks`
|
||||
- [x] **H3** `nix/module.nix` options: `enable`, `package`, `port` (default 1984), `bind` (default loopback), `tls.*`, `openFirewall`, `allowedHosts`, `docker.enable`, `settings`, `environmentFile`
|
||||
- [x] **H4** Service: dedicated user, `StateDirectory` 0700, `systemd-journal` group, P3 hardening set, config at `/etc/skyg-linux-tracker.toml`
|
||||
- [x] **H5** **CLI installed system-wide**, plain binary (DEC-10). Token commands refuse to run as root against another user's DB and print the `sudo -u skyg-linux-tracker …` command.
|
||||
- [x] **H6** Firewall: global `openFirewall` plus interface-scoped option. Eval assertion: non-loopback bind requires auth.
|
||||
- [x] **H7** README NixOS section: flake input, token workflow, exposure model, `allowedHosts`
|
||||
- [x] **H8** NixOS VM test: healthz, 401, mint token via CLI (`sudo -u`), 200, `/mcp`, revoke, 401, bad Origin 403, plus a TLS case
|
||||
- [ ] **Gate:** `nix build` and `nix flake check` pass. `ldd` shows no openssl. A fresh NixOS host serves `:1984` and a token can be minted from a login shell.
|
||||
|
||||
## Future
|
||||
|
||||
Reference in new issue
Block a user