Allow overriding jail base permissions
This commit is contained in:
parent
24de419827
commit
f18f1cf701
8 changed files with 154 additions and 74 deletions
12
helpers.nix
Normal file
12
helpers.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
pkgs: rec {
|
||||
dataDir = "~/.local/share/jail.nix";
|
||||
|
||||
dataDirSubPath = subPath: "${dataDir}/${escape subPath}";
|
||||
|
||||
noescape = value: { _noescape = value; };
|
||||
|
||||
escape = rawOrStr:
|
||||
if builtins.typeOf rawOrStr == "set" && rawOrStr ? _noescape
|
||||
then rawOrStr._noescape
|
||||
else pkgs.lib.strings.escapeShellArg rawOrStr;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue