21 lines
375 B
Nix
Raw Normal View History

{
config,
lib,
foo,
...
}:
let
inherit (builtins) elem;
inherit (lib) getName mkOption;
inherit (lib.types) listOf str;
in
{
# Pending https://github.com/NixOS/nixpkgs/issues/55674
options.allowedUnfree = mkOption {
type = listOf str;
default = [ ];
};
# config.nixpkgs.config.allowUnfreePredicate = p: elem (getName p) config.allowedUnfree;
}