lol

privoxy service: remove static uid

The service owns no data, having a static uid serves no purpose.

This frees up uid/gid 32

+9 -11
-2
nixos/modules/misc/ids.nix
··· 58 #utmp = 29; # unused 59 ddclient = 30; 60 davfs2 = 31; 61 - privoxy = 32; 62 #disnix = 33; # unused 63 osgi = 34; 64 tor = 35; ··· 322 utmp = 29; 323 #ddclient = 30; # unused 324 davfs2 = 31; 325 - privoxy = 32; 326 disnix = 33; 327 osgi = 34; 328 tor = 35;
··· 58 #utmp = 29; # unused 59 ddclient = 30; 60 davfs2 = 31; 61 #disnix = 33; # unused 62 osgi = 34; 63 tor = 35; ··· 321 utmp = 29; 322 #ddclient = 30; # unused 323 davfs2 = 31; 324 disnix = 33; 325 osgi = 34; 326 tor = 35;
+9 -9
nixos/modules/services/networking/privoxy.nix
··· 6 7 inherit (pkgs) privoxy; 8 9 - privoxyUser = "privoxy"; 10 - 11 cfg = config.services.privoxy; 12 13 confFile = pkgs.writeText "privoxy.conf" '' ··· 88 ###### implementation 89 90 config = mkIf cfg.enable { 91 - 92 - users.extraUsers = singleton 93 - { name = privoxyUser; 94 - uid = config.ids.uids.privoxy; 95 - description = "Privoxy daemon user"; 96 - }; 97 98 systemd.services.privoxy = { 99 description = "Filtering web proxy"; 100 after = [ "network.target" "nss-lookup.target" ]; 101 wantedBy = [ "multi-user.target" ]; 102 - serviceConfig.ExecStart = "${privoxy}/sbin/privoxy --no-daemon --user ${privoxyUser} ${confFile}"; 103 104 serviceConfig.PrivateDevices = true; 105 serviceConfig.PrivateTmp = true;
··· 6 7 inherit (pkgs) privoxy; 8 9 cfg = config.services.privoxy; 10 11 confFile = pkgs.writeText "privoxy.conf" '' ··· 86 ###### implementation 87 88 config = mkIf cfg.enable { 89 + 90 + users.users.privoxy = { 91 + isSystemUser = true; 92 + home = "/var/empty"; 93 + group = "privoxy"; 94 + }; 95 + 96 + users.groups.privoxy = {}; 97 98 systemd.services.privoxy = { 99 description = "Filtering web proxy"; 100 after = [ "network.target" "nss-lookup.target" ]; 101 wantedBy = [ "multi-user.target" ]; 102 + serviceConfig.ExecStart = "${privoxy}/bin/privoxy --no-daemon --user privoxy ${confFile}"; 103 104 serviceConfig.PrivateDevices = true; 105 serviceConfig.PrivateTmp = true;