2024-07-24 13:07:06 +00:00
|
|
|
{ lib, ... }:
|
|
|
|
|
|
|
|
{
|
2024-07-26 07:41:49 +00:00
|
|
|
imports = [
|
2024-07-29 11:03:31 +00:00
|
|
|
./boxxy.nix
|
2024-07-26 07:41:49 +00:00
|
|
|
./bubblewrap
|
|
|
|
];
|
2024-07-24 13:07:06 +00:00
|
|
|
|
|
|
|
options.wrappers =
|
|
|
|
let
|
2024-07-29 08:39:59 +00:00
|
|
|
sandboxingType = { name, lib, config, options, ... }: {
|
2024-07-24 13:07:06 +00:00
|
|
|
options.sandboxing = {
|
|
|
|
variant = lib.mkOption {
|
|
|
|
type = with lib.types; nullOr (enum []);
|
|
|
|
description = ''
|
|
|
|
The sandboxing framework to be applied to the wrapper. A value of
|
|
|
|
`null` will essentially disable it.
|
|
|
|
'';
|
|
|
|
default = null;
|
|
|
|
example = "bubblewrap";
|
|
|
|
};
|
2024-07-29 08:39:59 +00:00
|
|
|
|
|
|
|
wraparound = {
|
|
|
|
executable = options.arg0;
|
|
|
|
extraArgs = options.extraArgs;
|
|
|
|
};
|
2024-07-24 13:07:06 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.mkOption {
|
|
|
|
type = with lib.types; attrsOf (submodule sandboxingType);
|
|
|
|
};
|
|
|
|
}
|