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 = _:
|
||||
key: combinator: state:
|
||||
if lib.elem key state.included-once
|
||||
if lib.elem key state.includedOnce
|
||||
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.
|
||||
'';
|
||||
__functor = _:
|
||||
state: state // { new-session = false; }
|
||||
state: state // { newSession = false; }
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ in {
|
|||
path = [];
|
||||
argv = "\"$@\"";
|
||||
runtime = "";
|
||||
new-session = true;
|
||||
newSession = true;
|
||||
hostname = "jail";
|
||||
env = {};
|
||||
namespaces = {};
|
||||
included-once = []; # See include-once combinator
|
||||
includedOnce = []; # See include-once combinator
|
||||
cleanup = []; # See cleanup combinator
|
||||
};
|
||||
in lib.pipe initialState (
|
||||
|
|
@ -53,7 +53,7 @@ in {
|
|||
] 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:
|
||||
assert pkgs.lib.isValidPosixName envVar;
|
||||
unsafe-add-raw-args "--setenv ${envVar} ${s.env.${envVar}}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue