12 lines
325 B
Nix
12 lines
325 B
Nix
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;
|
|
}
|