mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-16 22:49:25 +03:00
cachix-agent: allow restarts now that deployments are subprocesses
This commit is contained in:
parent
e7d9b66a04
commit
c46a3dc50a
1 changed files with 6 additions and 3 deletions
|
@ -52,12 +52,15 @@ in {
|
||||||
path = [ config.nix.package ];
|
path = [ config.nix.package ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
# don't restart while changing
|
# Cachix requires $USER to be set
|
||||||
restartIfChanged = false;
|
environment.USER = "root";
|
||||||
|
|
||||||
|
# don't stop the service if the unit disappears
|
||||||
unitConfig.X-StopOnRemoval = false;
|
unitConfig.X-StopOnRemoval = false;
|
||||||
|
|
||||||
environment.USER = "root";
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
# we don't want to kill children processes as those are deployments
|
||||||
|
KillMode = "process";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
EnvironmentFile = cfg.credentialsFile;
|
EnvironmentFile = cfg.credentialsFile;
|
||||||
ExecStart = "${cfg.package}/bin/cachix ${lib.optionalString cfg.verbose "--verbose"} deploy agent ${cfg.name} ${if cfg.profile != null then profile else ""}";
|
ExecStart = "${cfg.package}/bin/cachix ${lib.optionalString cfg.verbose "--verbose"} deploy agent ${cfg.name} ${if cfg.profile != null then profile else ""}";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue