Files
machine_setup/nix/kubernetes/util/unfree_polyfill/default.nix
2026-04-26 12:44:56 -04:00

16 lines
360 B
Nix

{ config, lib, ... }:
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;
}