Skip to content

Commit

Permalink
nixos.cachix-agent: kill nix processes when stopping service
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerschtli committed Mar 9, 2024
1 parent c590f63 commit 1598c73
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nixos/misc/cachix-agent.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
let
inherit (lib)
mkEnableOption
mkForce
mkIf
;

Expand Down Expand Up @@ -33,6 +34,10 @@ in
credentialsFile = config.age.secrets."cachix-agent-token-${hostName}".path;
};

# upstream sets this to process which means that subprocesses are not killed and stopping the service does not stop
# the nix deployment process. control-group is the default value.
systemd.services.cachix-agent.serviceConfig.KillMode = mkForce "control-group";

};

}

0 comments on commit 1598c73

Please sign in to comment.