From 66115dd6bfb774c74e4cb271759051f281421881 Mon Sep 17 00:00:00 2001 From: diniamo Date: Tue, 29 Oct 2024 15:39:47 +0100 Subject: [PATCH] nixos/transmission: fix the type of `settings.umask` --- nixos/modules/services/torrent/transmission.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index 23f94d92042fc..1450e26f27030 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -176,13 +176,17 @@ in description = "Executable to be run at torrent completion."; }; umask = mkOption { - type = types.str; - default = "022"; + type = types.either types.int types.str; + default = if cfg.package == pkgs.transmission_3 then 18 else "022"; description = '' Sets transmission's file mode creation mask. See the umask(2) manpage for more information. Users who want their saved torrents to be world-writable - may want to set this value to `000`. + may want to set this value to 0/`"000"`. + + Keep in mind, that if you are using Transmission 3, this has to + be passed as a base 10 integer, whereas Transmission 4 takes + an octal number in a string instead. ''; }; utp-enabled = mkOption {