mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-10 15:40:21 +02:00
splitted apps + rewrote everything from scratch
This commit is contained in:
parent
7035632882
commit
ef42c9577a
20 changed files with 731 additions and 274 deletions
33
features/transmission.nix
Normal file
33
features/transmission.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.transmission;
|
||||
in
|
||||
{
|
||||
options.transmission = {
|
||||
directory = mkOption { type = lib.types.str; };
|
||||
};
|
||||
|
||||
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