From 9e822089b854b65dd492af3fcf7f382f56396cd1 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Wed, 13 May 2026 16:21:39 -0400 Subject: [PATCH] nixos/transmission: update systemd service based on upstream --- nixos/modules/services/torrent/transmission.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index 6ad7416a9c7d..b51cbac13b0a 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -393,7 +393,6 @@ in }; serviceConfig = { - Type = "notify"; # Use "+" because credentialsFile may not be accessible to User= or Group=. ExecStartPre = [ ( @@ -407,7 +406,6 @@ in ) ]; ExecStart = "${cfg.package}/bin/transmission-daemon -f -g ${cfg.home}/${settingsDir} ${escapeShellArgs cfg.extraFlags}"; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; User = cfg.user; Group = cfg.group; # Create rootDir in the host's mount namespace. @@ -513,7 +511,18 @@ in "quotactl" ]; SystemCallArchitectures = "native"; - }; + } + // ( + if lib.versionAtLeast cfg.package.version "4.1.1" then + { + Type = "notify-reload"; + } + else + { + Type = "notify"; + ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; + } + ); }; # It's useful to have transmission in path, e.g. for remote control