From 05bc708a7f16e71754810a7d5d2bf3871098d4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 5 Dec 2021 17:06:31 +0100 Subject: [PATCH] nixos/collectd: add missing group While upgrading my NixOS system I was greeted by this error: error: Failed assertions: - users.users.collectd.group is unset. This used to default to nogroup, but this is unsafe. For example you can create a group for this user with: users.users.collectd.group = "collectd"; users.groups.collectd = {}; Let's fix it. --- nixos/modules/services/monitoring/collectd.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/services/monitoring/collectd.nix b/nixos/modules/services/monitoring/collectd.nix index 6af04d22f0f7..660d108587de 100644 --- a/nixos/modules/services/monitoring/collectd.nix +++ b/nixos/modules/services/monitoring/collectd.nix @@ -132,7 +132,12 @@ in { users.users = optionalAttrs (cfg.user == "collectd") { collectd = { isSystemUser = true; + group = "collectd"; }; }; + + users.groups = optionalAttrs (cfg.user == "collectd") { + collectd = {}; + }; }; }