Merge pull request #212153 from Mic92/rtorrent

nixos/rtorrent: make directory permissions configurable
This commit is contained in:
Jörg Thalheim 2023-01-31 14:03:10 +00:00 committed by GitHub
commit badb11b99f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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} -" ];
};
};
}