From 99add84d3776aec0f4477164b7e6004ae39273e6 Mon Sep 17 00:00:00 2001 From: diniamo Date: Sun, 20 Oct 2024 20:32:16 +0200 Subject: [PATCH] nixos/transmission: adjust `settings.umask` * nixos/transmission: change `settings.umask` to be a string * nixos/transmission: change umask's default value to match the one in Transmission's documentation * nixos/doc: add entry for transmission umask option changes --- nixos/doc/manual/release-notes/rl-2411.section.md | 2 ++ nixos/modules/services/torrent/transmission.nix | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 188fe429fda0ea..477f566eb80cee 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -448,6 +448,8 @@ - The `stargazer.allowCgiUser` option has been added, enabling Stargazer's `cgi-user` option to work, which was previously broken. +- The type of `services.transmission.settings.umask` has been changed to `str`, and its default value to `"022"`. This was done in accordance with Transmission's documentation. Note that you can't simply wrap the old integer value in a string, you also have to convert it from decimal to octal. + - The `shiori` service now requires an HTTP secret value `SHIORI_HTTP_SECRET_KEY` to be provided via environment variable. The nixos module therefore, now provides an environmentFile option: ``` diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index ceef0db78b0948..b16f5c97fe4bbe 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -133,15 +133,13 @@ in description = "Executable to be run at torrent completion."; }; options.umask = mkOption { - type = types.int; - default = 2; + type = types.str; + default = "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 0. - Bear in mind that the json markup language only accepts numbers in base 10, - so the standard umask(2) octal notation "022" is written in settings.json as 18. + may want to set this value to `000`. ''; }; options.utp-enabled = mkOption {