From fa3664a176b36d731b5673d5674a8b81229acce1 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Fri, 17 Sep 2021 12:00:00 +0000 Subject: [PATCH] nixos/logcheck: define group, fix after #133166 --- nixos/modules/misc/ids.nix | 2 +- nixos/modules/services/logging/logcheck.nix | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 919826791a0..889e8248627 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 4296b2270c2..348ed8adf90 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