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, ... }: {
services.transmission = {
enable = true;
package = pkgs.transmission_4;
downloadDirPermissions = "775";
home = "/mnt/data/Torrents";
webHome = pkgs.flood-for-transmission;
openPeerPorts = true;
extraFlags = [
"--encryption-required"
"--no-portmap"
"--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;
services = {
caddy = {
virtualHosts."transmission.labs.adtya.xyz" = {
extraConfig = ''
reverse_proxy 10.10.10.14:9091
tls /persist/secrets/caddy/certs/transmission.crt /persist/secrets/caddy/certs/transmission.key
'';
};
};
transmission = {
enable = true;
package = pkgs.transmission_4;
downloadDirPermissions = "775";
home = "/mnt/data/Torrents";
webHome = pkgs.flood-for-transmission;
openPeerPorts = true;
extraFlags = [
"--encryption-required"
"--no-portmap"
"--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" ];

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 ];
}