diff --git a/home/services/default.nix b/home/services/default.nix index 8a7b354..0eba6ed 100644 --- a/home/services/default.nix +++ b/home/services/default.nix @@ -2,6 +2,7 @@ _: { imports = [ ./aria2c.nix ./gpg-agent.nix + ./transmission.nix ]; services = { gnome-keyring = { diff --git a/home/services/transmission.nix b/home/services/transmission.nix new file mode 100644 index 0000000..4f038d1 --- /dev/null +++ b/home/services/transmission.nix @@ -0,0 +1,25 @@ +{ 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)" ]; + After = [ "network.target" ]; + }; + Install = { + WantedBy = [ "default.target" ]; + }; + Service = { + Type = "simple"; + ExecStart = '' + ${transmission-daemon} -f -c "${torrents-dir}/init" --incomplete-dir "${torrents-dir}/.incomplete" --download-dir "${torrents-dir}/downloads" --encryption-preferred --portmap --dht --peerport 51413 --utp + ''; + }; + }; + }; +}