Revert "refactor: explicitly allow unfree packages"

This reverts commit 5131641023.
This commit is contained in:
Oliver Davies 2025-07-28 23:47:15 +01:00
parent 5131641023
commit d818f3a2d7
12 changed files with 7 additions and 64 deletions

View file

@ -1,26 +0,0 @@
{ config, lib, ... }:
{
options.nixpkgs.allowedUnfreePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
};
config.flake = {
modules =
let
predicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowedUnfreePackages;
in
{
nixos.pc.nixpkgs.config.allowUnfreePredicate = predicate;
homeManager.base = args: {
nixpkgs.config = lib.mkIf (!(args.hasGlobalPkgs or false)) {
allowUnfreePredicate = predicate;
};
};
};
meta.nixpkgs.allowedUnfreePackages = config.nixpkgs.allowedUnfreePackages;
};
}