configuration.nix/home/services/transmission.nix

28 lines
859 B
Nix
Raw Normal View History

2024-03-24 08:27:13 +05:30
{ config, pkgs, ... }: {
systemd.user.services = {
transmission-daemon =
let
torrents-dir = "${config.xdg.userDirs.download}/Torrents";
transmission-daemon = "${pkgs.transmission_4}/bin/transmission-daemon";
in
{
Unit = {
Description = "Transmission Daemon";
Documentation = [ "man:transmission-daemon(1)" ];
};
Install = {
WantedBy = [ "default.target" ];
};
Service = {
Type = "simple";
ExecStart = ''
2024-03-29 11:36:56 +05:30
${transmission-daemon} -f --encryption-preferred --portmap --dht --lpd --utp --peerport 51414 --port 9092 \
-c "${torrents-dir}/init" \
--incomplete-dir "${torrents-dir}/.incomplete" \
--download-dir "${torrents-dir}/downloads" \
2024-03-24 08:27:13 +05:30
'';
};
};
};
}