wrapper-manager/sandboxing/bubblewrap: add option to bundle certificates from nixpkgs

This commit is contained in:
Gabriel Arazas 2024-08-06 11:00:00 +08:00
parent a6c8213d57
commit 5773481ce0
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360

View File

@ -44,6 +44,10 @@ let
default = if isGlobal then true else cfg.enableNetwork;
};
enableBundledCertificates = lib.mkEnableOption "bundling additional certificates from nixpkgs" // {
default = if isGlobal then true else cfg.enableBundledCertificates;
};
enableIsolation = lib.mkEnableOption "unsharing most of the system" // {
default = if isGlobal then true else cfg.enableIsolation;
};
@ -106,6 +110,10 @@ in
];
})
(lib.mkIf submoduleCfg.enableBundledCertificates {
sandboxing.bubblewrap.sharedNixPaths = [ pkgs.cacert ];
})
(lib.mkIf submoduleCfg.enableIsolation {
sandboxing.bubblewrap.extraArgs = lib.mkBefore [ "--unshare-all" ];
})