nixos/nntp-proxy: define group, fix after #133166
This commit is contained in:
parent
fa3664a176
commit
af5ba65b9f
2 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue