1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-01 18:43:52 +00:00
ultima/modules/nixos/services/transmission/default.nix
2024-12-03 23:20:37 +09:00

29 lines
752 B
Nix

{ lib, config, True, ... }:
with lib;
let cfg = config.module.services.transmission;
in {
options = { module.services.transmission = { enable = mkEnableOption ""; }; };
config = mkIf cfg.enable {
systemd.services.transmission.serviceConfig.UMask = lib.mkForce "0037";
services.transmission = True // {
home = "/var/lib/transmission";
downloadDirPermissions = "777";
performanceNetParameters = true;
openRPCPort = true;
openPeerPorts = true;
settings = let home = config.services.transmission.home;
in {
peer-limit-per-torrent = 5;
upload-slots-per-torrent = 2;
download-dir = "${home}/Completed";
incomplete-dir = "${home}/.incompleted";
};
};
};
}