diff options
author | Aaron Andersen <aaron@fosslib.net> | 2019-05-25 10:13:12 -0400 |
---|---|---|
committer | Aaron Andersen <aaron@fosslib.net> | 2019-05-25 10:25:49 -0400 |
commit | 609c1580d83524d9c4db47c942f1980c56ee454d (patch) | |
tree | c3148776114d1cdcca70a23de3ed136e94e3fad8 /nixos/modules/services/monitoring/nagios.nix | |
parent | 4dd5c93998da55002fdec1c715c680531420381c (diff) |
nixos/nagios: change group from nogroup to nagios
see #55370
Diffstat (limited to 'nixos/modules/services/monitoring/nagios.nix')
-rw-r--r-- | nixos/modules/services/monitoring/nagios.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/services/monitoring/nagios.nix b/nixos/modules/services/monitoring/nagios.nix index 7f65236ed3d39..a0c7b0c31f8bb 100644 --- a/nixos/modules/services/monitoring/nagios.nix +++ b/nixos/modules/services/monitoring/nagios.nix @@ -36,7 +36,7 @@ let # Uid/gid that the daemon runs under. nagios_user=nagios - nagios_group=nogroup + nagios_group=nagios # Misc. options. illegal_macro_output_chars=`~$&|'"<> @@ -150,8 +150,11 @@ in uid = config.ids.uids.nagios; home = nagiosState; createHome = true; + group = "nagios"; }; + users.groups.nagios = { }; + # This isn't needed, it's just so that the user can type "nagiostats # -c /etc/nagios.cfg". environment.etc = [ @@ -169,6 +172,7 @@ in serviceConfig = { User = "nagios"; + Group = "nagios"; Restart = "always"; RestartSec = 2; PermissionsStartOnly = true; @@ -176,7 +180,7 @@ in preStart = '' mkdir -m 0755 -p ${nagiosState} ${nagiosLogDir} - chown nagios ${nagiosState} ${nagiosLogDir} + chown -R nagios:nagios ${nagiosState} ${nagiosLogDir} ''; script = '' |