layne: reverse proxy to transmission
This commit is contained in:
parent
41706989bb
commit
eb381fff35
3 changed files with 38 additions and 21 deletions
|
@ -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" ];
|
||||
|
|
7
hosts/layne/services/caddy.nix
Normal file
7
hosts/layne/services/caddy.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
_: {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
acmeCA = "https://acme-v02.api.letsencrypt.org/directory";
|
||||
email = "admin@acomputer.lol";
|
||||
};
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
_: {
|
||||
imports = [ ./apps ./btrfs.nix ./ssh.nix ];
|
||||
imports = [ ./apps ./caddy.nix ./btrfs.nix ./ssh.nix ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue