modules/programs: plum sandbox.keepPids and whitelistPwd into bunpen

This commit is contained in:
2024-09-03 02:25:28 +00:00
parent 53c4054bb7
commit ce7a082447

View File

@@ -32,6 +32,7 @@ let
bunpenGenerators = { bunpenGenerators = {
autodetectCliPaths = style: [ "--bunpen-autodetect" style ]; autodetectCliPaths = style: [ "--bunpen-autodetect" style ];
capability = cap: [ "--bunpen-cap" cap ]; capability = cap: [ "--bunpen-cap" cap ];
keepPids = [ "--bunpen-keep-pid" ];
method = m: assert m == "bunpen"; method = m: assert m == "bunpen";
# smuggle in some defaults # smuggle in some defaults
(lib.concatMap (devnode: [ "--bunpen-path" "/dev/${devnode}" ]) [ (lib.concatMap (devnode: [ "--bunpen-path" "/dev/${devnode}" ]) [
@@ -53,6 +54,7 @@ let
path = p: [ "--bunpen-path" p ]; path = p: [ "--bunpen-path" p ];
path-home = p: [ "--bunpen-home-path" p ]; path-home = p: [ "--bunpen-home-path" p ];
path-run = p: [ "--bunpen-run-path" p ]; path-run = p: [ "--bunpen-run-path" p ];
whitelistPwd = [ "--bunpen-path" "." ];
}; };
gen = if method == "bunpen" then gen = if method == "bunpen" then
bunpenGenerators bunpenGenerators