diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 919826791a01..889e82486277 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -139,7 +139,7 @@ in #users = 100; # unused # cgminer = 101; #dynamically allocated as of 2021-09-17 munin = 102; - logcheck = 103; + #logcheck = 103; #dynamically allocated as of 2021-09-17 #nix-ssh = 104; #dynamically allocated as of 2021-09-03 dictd = 105; couchdb = 106; diff --git a/nixos/modules/services/logging/logcheck.nix b/nixos/modules/services/logging/logcheck.nix index 4296b2270c29..348ed8adf903 100644 --- a/nixos/modules/services/logging/logcheck.nix +++ b/nixos/modules/services/logging/logcheck.nix @@ -215,12 +215,16 @@ in users.users = optionalAttrs (cfg.user == "logcheck") { logcheck = { - uid = config.ids.uids.logcheck; + group = "logcheck"; + isSystemUser = true; shell = "/bin/sh"; description = "Logcheck user account"; extraGroups = cfg.extraGroups; }; }; + users.groups = optionalAttrs (cfg.user == "logcheck") { + logcheck = {}; + }; system.activationScripts.logcheck = '' mkdir -m 700 -p /var/{lib,lock}/logcheck