summaryrefslogtreecommitdiffstats
path: root/nixos/modules
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2023-01-31 14:03:10 +0000
committerGitHub <noreply@github.com>2023-01-31 14:03:10 +0000
commitbadb11b99fbab1cf36086e3977d575740767db8b (patch)
treea678f78d60840205eee1278f6d0bf2f07ffbc71f /nixos/modules
parent67e156a1e44c26663f35db8560ecfe71d5788c3f (diff)
parentc0dc2ef1ff9ebd70faf9f8d259b397a3e2e256ed (diff)
Merge pull request #212153 from Mic92/rtorrent
nixos/rtorrent: make directory permissions configurable
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/torrent/rtorrent.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/services/torrent/rtorrent.nix b/nixos/modules/services/torrent/rtorrent.nix
index 627439e1079b..64cda7fb675f 100644
--- a/nixos/modules/services/torrent/rtorrent.nix
+++ b/nixos/modules/services/torrent/rtorrent.nix
@@ -19,6 +19,15 @@ in {
'';
};
+ dataPermissions = mkOption {
+ type = types.str;
+ default = "0750";
+ example = "0755";
+ description = lib.mdDoc ''
+ Unix Permissions in octal on the rtorrent directory.
+ '';
+ };
+
downloadDir = mkOption {
type = types.str;
default = "${cfg.dataDir}/download";
@@ -205,7 +214,7 @@ in {
};
};
- tmpfiles.rules = [ "d '${cfg.dataDir}' 0750 ${cfg.user} ${cfg.group} -" ];
+ tmpfiles.rules = [ "d '${cfg.dataDir}' ${cfg.dataPermissions} ${cfg.user} ${cfg.group} -" ];
};
};
}