settei/modules/system/settei/unfree.nix
2024-11-26 17:24:31 +01:00

19 lines
412 B
Nix

{ config, lib, ... }:
{
_file = ./unfree.nix;
options = {
# TODO(maybe?): Allow other types and more customizability
settei.unfree.allowedPackages =
with lib;
mkOption {
type = types.listOf types.str;
};
};
config = {
nixpkgs.config.allowUnfreePredicate = lib.mkForce (
pkg: builtins.elem (lib.getName pkg) config.settei.unfree.allowedPackages
);
};
}