modules/programs: reformatting

This commit is contained in:
2024-01-28 05:58:08 +00:00
parent 3eb3a8db5a
commit 9261d30a34
2 changed files with 5 additions and 4 deletions

View File

@@ -353,8 +353,8 @@ let
message = "program ${name} specified no `sandbox.method`; please configure a method, or set sandbox.enable = false.";
}
{
assertion = (p.net == "clearnet") || p.sandbox.method != null;
message = ''program "${name}" requests net "${p.net}", which requires sandboxing, but sandboxing was disabled'';
assertion = p.net == "clearnet" || p.sandbox.method != null;
message = ''program "${name}" requests net "${p.net}", which requires sandboxing, but sandboxing wasn't configured'';
}
] ++ builtins.map (sug: {
assertion = cfg ? "${sug}";
@@ -470,7 +470,7 @@ in
type = types.bool;
default = false;
description = ''
whether to require that every `sane.program` explicitly specify its sandbox settings
whether to require that every `sane.program` explicitly specify its sandbox settings.
'';
};
};

View File

@@ -136,7 +136,8 @@ let
# ensuring that every binary has in fact been wrapped.
_numExec=0
for b in ${packageWrapped}/bin/*; do
PATH="$PATH:${packageWrapped}/bin:${sane-sandboxed}/bin" \
echo "checking if $b is sandboxed"
PATH="${packageWrapped}/bin:${sane-sandboxed}/bin:$PATH" \
SANE_SANDBOX_DISABLE=1 \
"$b" --sane-sandbox-replace-cli echo "printing for test" \
| grep "printing for test"