Restart nix-daemon if it crashed

This commit is contained in:
Sandro - 2023-05-29 20:59:21 +02:00
parent 0afa21f343
commit 000000bd5d
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 6 additions and 1 deletions

View File

@ -217,7 +217,12 @@
'';
systemd = {
services.nix-daemon.serviceConfig.KillMode = "control-group";
services.nix-daemon.serviceConfig = {
# kill all worker thread when restarting
KillMode = "control-group";
# restart if killed eg oom killed
Restart = "on-failure";
};
# Reboot on hang
watchdog = lib.mkIf (!config.boot.isContainer) {