0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/monit: restart if config changes

This commit is contained in:
Ryan Mulligan 2018-03-28 14:45:57 -07:00
parent 4d5f7ce09f
commit 690fcc97ef

View file

@ -26,16 +26,10 @@ in
environment.systemPackages = [ pkgs.monit ]; environment.systemPackages = [ pkgs.monit ];
environment.etc = [ environment.etc."monitrc" = {
{ text = config.services.monit.config;
source = pkgs.writeTextFile { mode = "0400";
name = "monitrc"; };
text = config.services.monit.config;
};
target = "monitrc";
mode = "0400";
}
];
systemd.services.monit = { systemd.services.monit = {
description = "Pro-active monitoring utility for unix systems"; description = "Pro-active monitoring utility for unix systems";
@ -48,6 +42,8 @@ in
KillMode = "process"; KillMode = "process";
Restart = "always"; Restart = "always";
}; };
restartTriggers = [ config.environment.etc."monitrc".source ];
}; };
}; };
} }