15 lines
393 B
Nix
15 lines
393 B
Nix
{ lib, config, ... }:
|
|
{
|
|
options.allowedUnfreePackages = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [ ];
|
|
example = [ "steam" ];
|
|
};
|
|
|
|
config = {
|
|
nixpkgs.config = {
|
|
# https://github.com/NixOS/nixpkgs/issues/197325#issuecomment-1579420085
|
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages;
|
|
};
|
|
};
|
|
}
|