enable transmission daemon

This commit is contained in:
Adithya 2024-03-24 08:27:13 +05:30
parent 8da9143f7c
commit f17cfa7e06
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
2 changed files with 26 additions and 0 deletions

View file

@ -2,6 +2,7 @@ _: {
imports = [ imports = [
./aria2c.nix ./aria2c.nix
./gpg-agent.nix ./gpg-agent.nix
./transmission.nix
]; ];
services = { services = {
gnome-keyring = { gnome-keyring = {

View file

@ -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
'';
};
};
};
}