1 {config, pkgs, lib, ...}:
6 cfg = config.services.monit;
10 options.services.monit = {
12 enable = mkEnableOption (lib.mdDoc "Monit");
17 description = lib.mdDoc "monitrc content";
22 config = mkIf cfg.enable {
24 environment.systemPackages = [ pkgs.monit ];
26 environment.etc.monitrc = {
31 systemd.services.monit = {
32 description = "Pro-active monitoring utility for unix systems";
33 after = [ "network.target" ];
34 wantedBy = [ "multi-user.target" ];
36 ExecStart = "${pkgs.monit}/bin/monit -I -c /etc/monitrc";
37 ExecStop = "${pkgs.monit}/bin/monit -c /etc/monitrc quit";
38 ExecReload = "${pkgs.monit}/bin/monit -c /etc/monitrc reload";
42 restartTriggers = [ config.environment.etc.monitrc.source ];
47 meta.maintainers = with maintainers; [ ryantm ];