mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-09 23:20:18 +02:00
started refactoring
This commit is contained in:
parent
729050b005
commit
f61d2eedef
36 changed files with 12 additions and 10 deletions
47
hosts/sisyphe/features/multimedia/transmission.nix
Normal file
47
hosts/sisyphe/features/multimedia/transmission.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
secrets,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.downloads.transmission;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
downloads.transmission = {
|
||||
directory = mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/srv/Multimedia";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
sops.secrets.transmission = {
|
||||
sopsFile = "${secrets}/secrets/transmission.json";
|
||||
path = "/var/lib/secrets/transmission/settings.json";
|
||||
};
|
||||
|
||||
# torrenting apps
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
openRPCPort = true;
|
||||
credentialsFile = config.sops.secrets.transmission.path;
|
||||
settings = {
|
||||
rpc-bind-address = "0.0.0.0";
|
||||
rpc-whitelist-enabled = false;
|
||||
rpc-authentication-required = true;
|
||||
download-dir = "${cfg.directory}/Torrents";
|
||||
ratio-limit-enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."http://transmission.sisyphe.normandy.hypervirtual.world".extraConfig = ''
|
||||
reverse_proxy :9091
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue