{
config,
lib,
...
}: let
cfg = config.arta.unfree;
in {
options.arta.unfree = {
allow = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
};
};
config = {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) cfg.allow;
};
}