From db12d783ffd753145119c22a34ca5945e9a7a4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Fri, 7 Feb 2014 23:08:15 +0100 Subject: [PATCH] nixos: add uid/gid for munin To be compatible with eb2f44c18cb6d300e965308547d8a4dea110f519 (Generate /etc/passwd and /etc/group at build time). Without this you'll get this: $ nixos-rebuild build [...] user-thrown exception: The option `users.extraGroups.unnamed-9.1.gid' is used but not defined. --- nixos/modules/misc/ids.nix | 2 ++ nixos/modules/services/monitoring/munin.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 16eec904321..51da1a2cfce 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -110,6 +110,7 @@ openldap = 99; memcached = 100; cgminer = 101; + munin = 102; # When adding a uid, make sure it doesn't match an existing gid. @@ -199,6 +200,7 @@ haproxy = 92; openldap = 93; connman = 94; + munin = 95; # When adding a gid, make sure it doesn't match an existing uid. diff --git a/nixos/modules/services/monitoring/munin.nix b/nixos/modules/services/monitoring/munin.nix index 153f4942902..39c4fb1aefa 100644 --- a/nixos/modules/services/monitoring/munin.nix +++ b/nixos/modules/services/monitoring/munin.nix @@ -173,10 +173,12 @@ in name = "munin"; description = "Munin monitoring user"; group = "munin"; + uid = config.ids.uids.munin; }]; users.extraGroups = [{ name = "munin"; + gid = config.ids.gids.munin; }]; }) (mkIf nodeCfg.enable {