helm/modules/services/transmission.nix

33 lines
741 B
Nix
Raw Permalink Normal View History

{ config, options, pkgs, lib, my, ... }:
2020-01-13 21:25:39 -08:00
with lib;
with lib.my;
let cfg = config.modules.services.transmission;
in {
options.modules.services.transmission = {
enable = mkBoolOpt false;
2020-01-13 21:25:39 -08:00
};
config = mkIf cfg.enable {
services.transmission = {
enable = true;
2021-01-19 22:28:30 -08:00
home = "${config.user.home}/torrents";
settings = {
incomplete-dir-enabled = true;
rpc-whitelist = "127.0.0.1,192.168.*.*";
rpc-host-whitelist = "*";
rpc-host-whitelist-enabled = true;
ratio-limit = 0;
ratio-limit-enabled = true;
};
};
2020-01-13 21:25:39 -08:00
networking.firewall = {
allowedTCPPorts = [ 51413 ];
allowedUDPPorts = [ 51413 ];
};
user.extraGroups = [ "transmission" ];
};
2020-01-13 21:25:39 -08:00
}