mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
wrapper-manager/sandboxing: add wraparound under namespace
Each wrapper represents one... wrapper anyways so it is fine to have this. If nothing else applies, you could still make the specific sandboxing module to have its own wraparound option namespace. That practice should be discouraged though.
This commit is contained in:
parent
87f36c728d
commit
7ba31a2e75
@ -87,7 +87,10 @@ in
|
||||
config.env;
|
||||
|
||||
arg0 = lib.getExe' submoduleCfg.package "bwrap";
|
||||
prependArgs = lib.mkBefore (submoduleCfg.extraArgs ++ [ "--" submoduleCfg.wraparound.executable ] ++ submoduleCfg.wraparound.extraArgs);
|
||||
prependArgs = lib.mkBefore
|
||||
(submoduleCfg.extraArgs
|
||||
++ [ "--" config.sandboxing.wraparound.executable ]
|
||||
++ config.sandboxing.wraparound.extraArgs);
|
||||
}
|
||||
|
||||
(lib.mkIf submoduleCfg.enableNetwork {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
options.wrappers =
|
||||
let
|
||||
sandboxingType = { name, lib, config, ... }: {
|
||||
sandboxingType = { name, lib, config, options, ... }: {
|
||||
options.sandboxing = {
|
||||
variant = lib.mkOption {
|
||||
type = with lib.types; nullOr (enum []);
|
||||
@ -18,6 +18,11 @@
|
||||
default = null;
|
||||
example = "bubblewrap";
|
||||
};
|
||||
|
||||
wraparound = {
|
||||
executable = options.arg0;
|
||||
extraArgs = options.extraArgs;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user