2025-09-14 12:22:20 +02:00
|
|
|
{ lib, config, ... }:
|
|
|
|
|
{
|
2026-05-03 16:32:26 +02:00
|
|
|
options.my.allowedUnfreePackages = lib.mkOption {
|
2025-09-14 12:22:20 +02:00
|
|
|
type = lib.types.listOf lib.types.str;
|
|
|
|
|
default = [ ];
|
|
|
|
|
example = [ "steam" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
config = {
|
|
|
|
|
nixpkgs.config = {
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/197325#issuecomment-1579420085
|
2025-09-15 19:01:30 +02:00
|
|
|
allowUnfreePredicate = lib.mkDefault (
|
2026-05-03 16:32:26 +02:00
|
|
|
pkg: builtins.elem (lib.getName pkg) config.my.allowedUnfreePackages
|
2025-09-15 19:01:30 +02:00
|
|
|
);
|
2025-09-14 12:22:20 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|