29 lines
737 B
Nix
29 lines
737 B
Nix
{ config, ... }:
|
|
let
|
|
account = config.repo.account;
|
|
in
|
|
{
|
|
flake.modules.nixos.transmission =
|
|
{ config, pkgs, ... }:
|
|
{
|
|
services.transmission = {
|
|
enable = true;
|
|
package = pkgs.transmission_4;
|
|
openPeerPorts = true;
|
|
downloadDirPermissions = "775";
|
|
|
|
settings = {
|
|
download-dir = "${account.homeDirectory}/torrents";
|
|
incomplete-dir = "${account.homeDirectory}/torrents/.incomplete";
|
|
peer-port = 43864;
|
|
umask = "002";
|
|
};
|
|
};
|
|
|
|
# NOTE: Upstream bug?
|
|
systemd.services.transmission-setup.requiredBy = [ "transmission.service" ];
|
|
|
|
users.users.${account.name}.extraGroups = [ config.services.transmission.group ];
|
|
};
|
|
}
|