krebs.setuid: add option "envp"

This commit is contained in:
tv 2016-06-05 00:31:36 +02:00
parent 0f7e6ee7f9
commit c1c645b545

View file

@ -20,6 +20,10 @@ let
type = types.filename;
default = config._module.args.name;
};
envp = mkOption {
type = types.attrsOf types.str;
default = {};
};
filename = mkOption {
type = mkOptionType {
# TODO unyuck string and merge with toC
@ -57,7 +61,7 @@ let
};
config.activate = let
src = pkgs.execve config.name {
inherit (config) filename;
inherit (config) envp filename;
};
dst = "${wrapperDir}/${config.name}";
in ''