Restructure source

This commit is contained in:
Alex David 2025-08-07 15:52:43 -07:00
commit c7685334cf
8 changed files with 9 additions and 8 deletions

12
lib/helpers.nix Normal file
View 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;
}