wrapper-manager/sandboxing/bubblewrap: add option for ensuring dying with parent

This commit is contained in:
Gabriel Arazas 2024-07-27 11:46:51 +08:00
parent 34f086a6a5
commit 971d786b81
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360

View File

@ -45,6 +45,10 @@ let
enableIsolation = lib.mkEnableOption "unsharing most of the system" // {
default = if isGlobal then true else cfg.enableIsolation;
};
enableEnsureChildDiesWithParent = lib.mkEnableOption "ensuring child processes die with parent" // {
default = if isGlobal then true else cfg.enableEnsureChildDiesWithParent;
};
};
in
{
@ -104,6 +108,9 @@ in
(lib.mkIf submoduleCfg.enableIsolation {
sandboxing.bubblewrap.extraArgs = lib.mkBefore [ "--unshare-all" ];
})
(lib.mkIf submoduleCfg.enableEnsureChildDiesWithParent {
sandboxing.bubblewrap.extraArgs = lib.mkBefore [ "--die-with-parent" ];
})
]);
};