-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos: Apply changes from nixpkgs module #186
Conversation
Also cc'ing @adamcstephens |
58671a5
to
80ba673
Compare
systemd.services.atticd = { | ||
wantedBy = [ "multi-user.target" ]; | ||
after = [ "network-online.target" ] ++ lib.optionals hasLocalPostgresDB [ "postgresql.service" ]; | ||
requires = lib.optionals hasLocalPostgresDB [ "postgresql.service" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was pointed out to me that the after generates an eval warning. You'll want this too NixOS/nixpkgs#349083
Co-authored-by: Adam Stephens <adam@valkor.net>
Co-authored-by: Adam Stephens <adam@valkor.net>
Co-authored-by: Adam Stephens <adam@valkor.net>
Co-authored-by: Adam Stephens <adam@valkor.net>
Co-authored-by: Adam Stephens <adam@valkor.net>
fixes: trace: evaluation warning: atticd.service is ordered after 'network-online.target' but doesn't depend on it
80ba673
to
ba5ba2d
Compare
''; | ||
export ATTIC_SERVER_TOKEN_HS256_SECRET_BASE64="dGVzdCBzZWNyZXQ=" | ||
export ATTIC_SERVER_DATABASE_URL="sqlite://:memory:" | ||
${lib.getExe cfg.package} --mode check-config -f $configFile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think using getExe
makes sense here or in serviceConfig
.
This breaks using the attic
(or attic-nixpkgs
) package for the service, because that package has attic
set as mainProgram
, which is the wrong binary to use here. So setting services.attic.package = pkgs.attic
was working fine before this change, but is broken with it.
Since this package includes both server and client, it should be usable here IMO.
I've been using that package to avoid having to build attic twice, for server and client binaries.
This PR updates the NixOS module to follow the one added in NixOS/nixpkgs#347749.
In particular,
services.atticd.credentialsFile
was renamed toservices.atticd.environmentFile
and new hardening options were added to the systemd service.