mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-09 07:00:21 +02:00
huge refactoring
This commit is contained in:
parent
fffcee128e
commit
7a2fba99cd
30 changed files with 246 additions and 201 deletions
|
@ -1,38 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.transmission;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
transmission = {
|
||||
directory = mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/srv/Multimedia";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
sops.secrets."transmission" = {
|
||||
sopsFile = ../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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue