feat(nix): expose nixosModules.default from the flake #50
No reviewers
Labels
No labels
epic
in-review
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
weiwen/evie!50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "sandcastle/issue-48"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
nixos/module.nixwith aservices.evieNixOS option that installs evie as a hardened systemd servicesettingsattrset serialised to TOML viapkgs.formats.toml {}; tracks the Rust config surface without per-option churnbotTokenFile/apiKeyFileoptions use systemdLoadCredentialso secrets never enter the Nix store; a PythonExecStartPrescript patches values into the runtime config at/run/evie/config.tomlDynamicUser,ProtectSystem=strict,ProtectHome=read-only,NoNewPrivileges,PrivateTmp,StateDirectory/RuntimeDirectorymanaged by systemdnixosModules.defaultexposed via the curried{ self }pattern so the default package carries thepi-wrappingpostInstallpath without requiring an overlayflake.nixmergesnixosModulesoutsideeachDefaultSystemusing//CONTEXT.mdupdated to document the new outputDecisions
settings-style freeform (vs full typed options): lower maintenance burden as the Rust config evolvesLoadCredential+ Python patch: secrets stay off disk/store; Python stdlibrehandles arbitrary secret characters safely{ self }module: standard flake pattern; lets the default package be the flake's own built evie (withpion PATH) without requiring user-side overlay configurationCloses #48
Adds nixos/module.nix providing a services.evie NixOS option that: - Runs evie as a hardened systemd service (DynamicUser, ProtectSystem=strict, ProtectHome=read-only, NoNewPrivileges, PrivateTmp) - Accepts a freeform `settings` attrset serialised to TOML via pkgs.formats.toml {}; tracks the Rust config surface with no per-option churn - Keeps secrets out of the Nix store via botTokenFile / apiKeyFile options that use systemd LoadCredential; a Python preStart script patches the values into the runtime config at /run/evie/config.toml - Defaults the package to self.packages.${system}.default via a curried { self } outer argument so pi is already on PATH (postInstall wrapping) flake.nix merges nixosModules outside eachDefaultSystem (system-agnostic) using the // operator. CONTEXT.md updated to document the new output. Closes #48 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>