nixos/spiped: use systemctl restart during activation

As is common with other networking services, stopIfChanged=true (the default) can cause O(seconds) downtime during activation.

Reduce this downtime by disabling stopIfChanged as done in:
* sshd https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/ssh/sshd.nix#L569
* tailscale https://github.com/NixOS/nixpkgs/pull/170210
This commit is contained in:
Tom Fitzhenry
2024-11-17 20:39:25 +11:00
committed by tomf
parent 235d103ff7
commit a2337e4f6c
@@ -186,6 +186,7 @@ in
Restart = "always";
User = "spiped";
};
stopIfChanged = false;
scriptArgs = "%i";
script = "exec ${pkgs.spiped}/bin/spiped -F `cat /etc/spiped/$1.spec`";