git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit05bc708a7f16e71754810a7d5d2bf3871098d4f2 authorBjørn Forsman <bjorn.forsman@gmail.com> dateSun 5 Dec 2021, 17:06 (5 years ago) parent56cbe42
1 file changed+5
nixos/modules/services/monitoring/collectd.nix+5
nixos/modules/services/monitoring/collectd.nix+5
@@ -132,7 +132,12 @@ in {
132132 users.users = optionalAttrs (cfg.user == "collectd") {
133133 collectd = {
134134 isSystemUser = true;
135+ group = "collectd";
135136 };
136137 };
138+
139+ users.groups = optionalAttrs (cfg.user == "collectd") {
140+ collectd = {};
141+ };
137142 };
138143}