From af5ba65b9f4b9fee755fb6701400b7d61d1804e3 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Fri, 17 Sep 2021 12:00:00 +0000 Subject: [PATCH] nixos/nntp-proxy: define group, fix after #133166 --- nixos/modules/misc/ids.nix | 2 +- nixos/modules/services/networking/nntp-proxy.nix | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 889e8248627..b958922c0e4 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -262,7 +262,7 @@ in pdnsd = 229; octoprint = 230; avahi-autoipd = 231; - nntp-proxy = 232; + # nntp-proxy = 232; #dynamically allocated as of 2021-09-17 mjpg-streamer = 233; #radicale = 234;# dynamically allocated as of 2021-09-03 hydra-queue-runner = 235; diff --git a/nixos/modules/services/networking/nntp-proxy.nix b/nixos/modules/services/networking/nntp-proxy.nix index cc061bf6e3b..0083990cff5 100644 --- a/nixos/modules/services/networking/nntp-proxy.nix +++ b/nixos/modules/services/networking/nntp-proxy.nix @@ -6,8 +6,6 @@ let inherit (pkgs) nntp-proxy; - proxyUser = "nntp-proxy"; - cfg = config.services.nntp-proxy; configBool = b: if b then "TRUE" else "FALSE"; @@ -210,16 +208,18 @@ in config = mkIf cfg.enable { - users.users.${proxyUser} = - { uid = config.ids.uids.nntp-proxy; - description = "NNTP-Proxy daemon user"; - }; + users.users.nntp-proxy = { + isSystemUser = true; + group = "nntp-proxy"; + description = "NNTP-Proxy daemon user"; + }; + users.groups.nntp-proxy = {}; systemd.services.nntp-proxy = { description = "NNTP proxy"; after = [ "network.target" "nss-lookup.target" ]; wantedBy = [ "multi-user.target" ]; - serviceConfig = { User="${proxyUser}"; }; + serviceConfig = { User="nntp-proxy"; }; serviceConfig.ExecStart = "${nntp-proxy}/bin/nntp-proxy ${confFile}"; preStart = '' if [ ! \( -f ${cfg.sslCert} -a -f ${cfg.sslKey} \) ]; then