Use camelCase for state attributes
This commit is contained in:
parent
595bc0e2e4
commit
2ca02c8bfe
2 changed files with 6 additions and 6 deletions
|
|
@ -122,9 +122,9 @@ in rec {
|
||||||
'';
|
'';
|
||||||
__functor = _:
|
__functor = _:
|
||||||
key: combinator: state:
|
key: combinator: state:
|
||||||
if lib.elem key state.included-once
|
if lib.elem key state.includedOnce
|
||||||
then state
|
then state
|
||||||
else combinator (state // { included-once = state.included-once ++ [ key ]; })
|
else combinator (state // { includedOnce = state.includedOnce ++ [ key ]; })
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -281,7 +281,7 @@ in rec {
|
||||||
See BWRAP(1) for more information and security implications.
|
See BWRAP(1) for more information and security implications.
|
||||||
'';
|
'';
|
||||||
__functor = _:
|
__functor = _:
|
||||||
state: state // { new-session = false; }
|
state: state // { newSession = false; }
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,11 @@ in {
|
||||||
path = [];
|
path = [];
|
||||||
argv = "\"$@\"";
|
argv = "\"$@\"";
|
||||||
runtime = "";
|
runtime = "";
|
||||||
new-session = true;
|
newSession = true;
|
||||||
hostname = "jail";
|
hostname = "jail";
|
||||||
env = {};
|
env = {};
|
||||||
namespaces = {};
|
namespaces = {};
|
||||||
included-once = []; # See include-once combinator
|
includedOnce = []; # See include-once combinator
|
||||||
cleanup = []; # See cleanup combinator
|
cleanup = []; # See cleanup combinator
|
||||||
};
|
};
|
||||||
in lib.pipe initialState (
|
in lib.pipe initialState (
|
||||||
|
|
@ -53,7 +53,7 @@ in {
|
||||||
] s
|
] s
|
||||||
)
|
)
|
||||||
(s: if builtins.length s.path > 0 then set-env "PATH" (lib.concatStringsSep ":" s.path) s else s)
|
(s: if builtins.length s.path > 0 then set-env "PATH" (lib.concatStringsSep ":" s.path) s else s)
|
||||||
(s: if s.new-session then unsafe-add-raw-args "--new-session" s else s)
|
(s: if s.newSession then unsafe-add-raw-args "--new-session" s else s)
|
||||||
(s: lib.foldr (envVar:
|
(s: lib.foldr (envVar:
|
||||||
assert pkgs.lib.isValidPosixName envVar;
|
assert pkgs.lib.isValidPosixName envVar;
|
||||||
unsafe-add-raw-args "--setenv ${envVar} ${s.env.${envVar}}"
|
unsafe-add-raw-args "--setenv ${envVar} ${s.env.${envVar}}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue