Skip to content

Commit

Permalink
nixos/transmission: adjust settings.umask
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
diniamo committed Oct 21, 2024
1 parent 2a95839 commit 99add84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2411.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
Expand Down
8 changes: 3 additions & 5 deletions nixos/modules/services/torrent/transmission.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 99add84

Please sign in to comment.