{ config, lib, ... }:
with lib; {
  options.nixpkgs.allowUnfreePackages = mkOption {
    type = types.listOf types.str;
    default = [];
  };

  config.nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
}
