Skip to content

Commit

Permalink
nixos.cachix-agent: only set to KillMode control-group for desktops
Browse files Browse the repository at this point in the history
Deployments fail when cachix-agent is restarted during activation
because it kills the deployment itself when set to control-group.
  • Loading branch information
Gerschtli committed Mar 13, 2024
1 parent 37b4e90 commit 735f54c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nixos/misc/cachix-agent.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ 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";
# 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.
# Only set to control-group for desktop systems to prevent that system halt might be prevented by orphaned nix
# processes.
systemd.services.cachix-agent.serviceConfig.KillMode = mkIf config.custom.base.desktop.enable (mkForce "control-group");

};

Expand Down

0 comments on commit 735f54c

Please sign in to comment.