layne: reverse proxy to transmission

This commit is contained in:
Adithya 2024-07-17 10:45:56 +05:30
parent 41706989bb
commit eb381fff35
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
3 changed files with 38 additions and 21 deletions

View file

@ -1,24 +1,34 @@
{ pkgs, ... }: { { pkgs, ... }: {
services.transmission = { services = {
enable = true; caddy = {
package = pkgs.transmission_4; virtualHosts."transmission.labs.adtya.xyz" = {
downloadDirPermissions = "775"; extraConfig = ''
home = "/mnt/data/Torrents"; reverse_proxy 10.10.10.14:9091
webHome = pkgs.flood-for-transmission; tls /persist/secrets/caddy/certs/transmission.crt /persist/secrets/caddy/certs/transmission.key
openPeerPorts = true; '';
extraFlags = [ };
"--encryption-required" };
"--no-portmap" transmission = {
"--dht" enable = true;
"--lpd" package = pkgs.transmission_4;
"--allowed" downloadDirPermissions = "775";
"127.0.0.1,10.10.10.*" home = "/mnt/data/Torrents";
]; webHome = pkgs.flood-for-transmission;
settings = { openPeerPorts = true;
peer-port = 51515; extraFlags = [
rpc-bind-address = "10.10.10.14"; "--encryption-required"
rpc-port = 9091; "--no-portmap"
watch-dir-enabled = true; "--dht"
"--lpd"
"--allowed"
"127.0.0.1,10.10.10.*"
];
settings = {
peer-port = 51515;
rpc-bind-address = "10.10.10.14";
rpc-port = 9091;
watch-dir-enabled = true;
};
}; };
}; };
systemd.services.transmission.unitConfig.RequiresMountsFor = [ "/mnt/data" ]; systemd.services.transmission.unitConfig.RequiresMountsFor = [ "/mnt/data" ];

View file

@ -0,0 +1,7 @@
_: {
services.caddy = {
enable = true;
acmeCA = "https://acme-v02.api.letsencrypt.org/directory";
email = "admin@acomputer.lol";
};
}

View file

@ -1,3 +1,3 @@
_: { _: {
imports = [ ./apps ./btrfs.nix ./ssh.nix ]; imports = [ ./apps ./caddy.nix ./btrfs.nix ./ssh.nix ];
} }