mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-08 22:50:19 +02:00
(feat): reformatted code for flakes usage
This commit is contained in:
parent
d29d6f0133
commit
c3956d6fa4
40 changed files with 130 additions and 76 deletions
38
features/server/multimedia/transmission.nix
Normal file
38
features/server/multimedia/transmission.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ 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