mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
extract unfree option to it's own module
This commit is contained in:
parent
03b359ee5a
commit
3aef3e349f
2 changed files with 74 additions and 73 deletions
12
nixosModules/unfree.nix
Normal file
12
nixosModules/unfree.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, config }:
|
||||
{
|
||||
options.local.allowedUnfree = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
config = {
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg: builtins.elem (lib.getName pkg) config.local.allowedUnfree;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue