mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-01 19:43:56 +00:00
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
x,
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
with x;
|
|
let
|
|
cfg = config.module.services.transmission;
|
|
in
|
|
{
|
|
options = {
|
|
module.services.transmission = {
|
|
enable = mkBool;
|
|
tui.enable = mkBool;
|
|
};
|
|
};
|
|
|
|
config = mkMerge [
|
|
(mkIf cfg.tui.enable {
|
|
environment.systemPackages = with pkgs; [
|
|
(callPackage ./torque.nix { })
|
|
rustmission
|
|
];
|
|
})
|
|
(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 = with config.services.transmission; {
|
|
peer-limit-per-torrent = 5;
|
|
upload-slots-per-torrent = 2;
|
|
download-dir = "${home}/Completed";
|
|
incomplete-dir = "${home}/.incompleted";
|
|
};
|
|
};
|
|
networking.hosts = {
|
|
"163.172.167.207" = [
|
|
"bt.t-ru.org"
|
|
"bt2.t-ru.org"
|
|
"bt3.t-ru.org"
|
|
"bt4.t-ru.org"
|
|
];
|
|
};
|
|
})
|
|
];
|
|
}
|