diff --git a/os/3proxy.nix b/os/3proxy.nix new file mode 100644 index 0000000..82785e0 --- /dev/null +++ b/os/3proxy.nix @@ -0,0 +1,26 @@ +{ + services._3proxy = { + enable = true; + services = [ + { + type = "socks"; + auth = [ "strong" ]; + acl = [ { + rule = "allow"; + users = [ "user1" ]; + } + ]; + } + ]; + usersFile = "/etc/3proxy.passwd"; + }; + + environment.etc = { + "3proxy.passwd".text = '' + user1:CR:$1$TqAb0wvc$e.O2GhdhXaMYSxNdNBmzh/ + ''; + }; + + networking.firewall.allowedTCPPorts = [ 1080 ]; + networking.firewall.allowedUDPPorts = [ 1080 ]; +} diff --git a/os/ks/configuration.nix b/os/ks/configuration.nix index f4530af..afa2af2 100644 --- a/os/ks/configuration.nix +++ b/os/ks/configuration.nix @@ -8,6 +8,7 @@ in { imports = [ ./hardware-configuration.nix ../common.nix + ../3proxy.nix inputs.simple-nixos-mailserver.nixosModule ];