forked from NixOS/nixos-hardware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create lenovo-yoga-7-14ARH7-amdgpu and lenovo-yoga-7-14ARH7-nvidia en…
…tries - Previous attr-set style providing "amdgpu" and "nvidia" is broken by PR NixOS#1046 - Add deprecation assertion for lenovo-yoga-7-14ARH7
- Loading branch information
1 parent
0550809
commit 5bd0371
Showing
3 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Deprecation of //lenovo/yoga/7/14ARH7/default.nix | ||
|
||
Background: | ||
The `lenovo-yoga-7-14ARH7` provides an attr-set with `amdgpu` and `nvidia` entries, to allow users | ||
to choose whether to enable only the AMD-GPU driver, or also enable the NVidia driver with (by | ||
default) Prime enabled. | ||
|
||
However, this attr-set style seems to be broken by [PR #1046](https://github.com/NixOS/nixos-hardware/pull/1046), | ||
which exports modules as paths, instead. | ||
That change seems to cause an error of "value is a path while a set was expected". | ||
|
||
[PR #1053](https://github.com/NixOS/nixos-hardware/pull/1053): | ||
- Replaced `lenovo-yoga-7-14ARH7.amdgpu` with a `lenovo-yoga-7-14ARH7-amdgpu` entry. | ||
- Replaced `lenovo-yoga-7-14ARH7.nvidia` with a `lenovo-yoga-7-14ARH7-nvidia` entry. | ||
- Made `lenovo-yoga-7-14ARH7` throw a deprecation error. | ||
- [FIXES: #1052](https://github.com/NixOS/nixos-hardware/issues/1052) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
# When using from a Flake, you can access these via imports of the attr key, e.g: | ||
# | ||
# imports = [ | ||
# nixos-hardware.nixosModules.lenovo-yoga-7-14ARH7.amdgpu | ||
# ]; | ||
# | ||
## or: | ||
# imports = [ | ||
# nixos-hardware.nixosModules.lenovo-yoga-7-14ARH7.nvidia | ||
# ]; | ||
{ ... }: | ||
|
||
{ | ||
amdgpu = import ./amdgpu; | ||
nvidia = import ./nvidia; | ||
assertions = [ | ||
{ | ||
assertion = false; | ||
message = "Importing lenovo/yoga/7/14ARH7/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md for more details"; | ||
} | ||
]; | ||
} |