nixos/nntp-proxy: define group, fix after #133166

main
Guillaume Girol 3 years ago committed by Yuka
parent fa3664a176
commit af5ba65b9f
  1. 2
      nixos/modules/misc/ids.nix
  2. 14
      nixos/modules/services/networking/nntp-proxy.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;

@ -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…
Cancel
Save