diff --git a/modules/services/monitoring/monit.nix b/modules/services/monitoring/monit.nix index 118b329afc50..e51e6d1872a1 100644 --- a/modules/services/monitoring/monit.nix +++ b/modules/services/monitoring/monit.nix @@ -26,7 +26,7 @@ in }; }; - config = { + config = mkIf config.services.monit.enable { environment.etc = [ { source = pkgs.writeTextFile { @@ -37,7 +37,7 @@ in mode = "0400"; } ]; - jobs.monit = mkIf config.services.monit.enable { + jobs.monit = { description = "Monit system watcher"; startOn = config.services.monit.startOn;