modules/nixpkgs: add setting nixpkgs.config.allowUnfreePackages = ["list" "of "packages"]
Inspired by https://github.com/NixOS/nixpkgs/issues/197325 this adds a
new option `nixpkgs.allowUnfreePackages`, which merges additively and can
thus be defined in multiple modules close to where the unfree package is
installed.
I would have liked to name this option
`nixpkgs.config.allowUnfreePackages`, to define it closer to where the
`allowUnfree` and `allowUnfreePredicate` are defined, but I didn't see how
this could be achieved. I would welcome some guidance on how to do this.
Cherry-picks a3c9221d64
This commit is contained in:
parent
ff3cd5fa14
commit
a3dffa03ad
1 changed files with 3 additions and 0 deletions
|
|
@ -23,6 +23,9 @@ let
|
|||
rhs = optCall rhs_ { inherit pkgs; };
|
||||
in
|
||||
lib.recursiveUpdate lhs rhs
|
||||
// lib.optionalAttrs (lhs ? allowUnfreePackages) {
|
||||
allowUnfreePackages = lhs.allowUnfreePackages ++ (lib.attrByPath [ "allowUnfreePackages" ] [ ] rhs);
|
||||
}
|
||||
// lib.optionalAttrs (lhs ? packageOverrides) {
|
||||
packageOverrides =
|
||||
pkgs:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue