diff --git a/application/containers.nix b/application/containers.nix index a9238e2..2a36eed 100644 --- a/application/containers.nix +++ b/application/containers.nix @@ -1,3 +1,4 @@ +{ config, ... }: { virtualisation.oci-containers = { containers = { @@ -74,7 +75,7 @@ "/home/torrent/data:/data" ]; environmentFiles = - [ /home/sezycei/srv/containerdata/transmission/.env ]; + [ config.age.secrets.transmission-env.path ]; extraOptions = [ "--cap-add=NET_ADMIN" "--privileged" ]; }; diff --git a/application/nginx.nix b/application/nginx.nix index 90521f9..eaf8021 100644 --- a/application/nginx.nix +++ b/application/nginx.nix @@ -1,11 +1,7 @@ -{ pkgs, config, ... }: -let - containernix = import ./containers.nix; - containers = containernix.virtualisation.oci-containers.containers; -in -{ +{ pkgs, config, ... }: { services.nginx = { enable = true; + recommendedProxySettings = true; recommendedOptimisation = true; recommendedGzipSettings = true; @@ -36,6 +32,7 @@ in extraConfig = extra; }; }; + proxiedLAN = { target }: base { "/" = { proxyPass = target; @@ -58,7 +55,7 @@ in }; "eversole.co" = static { dir = "/var/www/jame.su"; }; "git.eversole.co" = proxied { target = "http://127.0.0.1:5121"; }; - "graf.eversole.co" = { root = "/var/www/graf.eversole.co"; }; # refer to /monitoring/nginx.nix + "graf.matri.cx" = { root = "/var/www/graf.matri.cx"; }; # refer to /monitoring/nginx.nix "hydra.matri.cx" = proxied { target = "http://127.0.0.1:3034"; extra = '' @@ -70,7 +67,7 @@ in "media.matri.cx" = proxied { target = "http://127.0.0.1:8096"; }; "sezycei.com" = static { dir = "/var/www/sezycei.com"; }; "snakebelmont.com" = static { dir = "/var/www/snakebelmont.com"; }; - "transmission.matri.cx" = proxiedLAN { target = "http://127.0.0.1:9001"; }; + "transmission.matri.cx" = proxiedLAN { target = "http://127.0.0.1:9091"; }; "purr.eversole.co" = proxied { target = "http://127.0.0.1:5195"; }; }; }; diff --git a/secrets.nix b/secrets.nix index 8e7d1eb..04cdd0b 100644 --- a/secrets.nix +++ b/secrets.nix @@ -11,4 +11,5 @@ in "secrets/htpasswd-dock.age" = { publicKeys = all; }; "secrets/keys.age" = { publicKeys = all; }; "secrets/sezycei.age" = { publicKeys = all; }; + "secrets/transmission-env.age" = { publicKeys = all; }; } diff --git a/secrets/transmission-env.age b/secrets/transmission-env.age new file mode 100644 index 0000000..53cc046 Binary files /dev/null and b/secrets/transmission-env.age differ diff --git a/system/age.nix b/system/age.nix index 2e034a3..9b59db6 100644 --- a/system/age.nix +++ b/system/age.nix @@ -11,6 +11,7 @@ htpasswd-dock.file = ../secrets/htpasswd-dock.age; keys.file = ../secrets/keys.age; sezycei.file = ../secrets/sezycei.age; + transmission-env.file = ../secrets/transmission-env.age; }; identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; };