transmission_4: add option to allow additional paths in AppArmor rules

This change adds an extraAppArmorPaths option to the transmission_4
derivation to allow additional read-only paths to be added to the
ppArmor rules. This can be combined with the TRANSMISSION_WEB_HOME
environment variable to override the web UI.
This commit is contained in:
Alex James 2023-10-07 19:03:06 -05:00
parent 922c530087
commit 71ab0b6c1c
No known key found for this signature in database
GPG Key ID: 2811C5BA55DA7094

View File

@ -35,6 +35,7 @@
, enableCli ? true
, installLib ? false
, apparmorRulesFromClosure
, extraAppArmorPaths ? []
}:
stdenv.mkDerivation (finalAttrs: {
@ -135,6 +136,7 @@ stdenv.mkDerivation (finalAttrs: {
rwk /tmp/tr_session_id_*,
r $out/share/transmission/public_html/**,
${lib.strings.concatMapStrings (x: "r ${x},\n") extraAppArmorPaths}
include <local/bin.transmission-daemon>
}