diff --git a/README.md b/README.md index 4d23e8d..0cbfe4f 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ See code for all available configurations. | [Google Pixelbook][] | `` | | [Inverse Path USB armory][] | `` | | Lenovo IdeaPad Z510 | `` | +| Lenovo ThinkPad E470 | `` | Lenovo ThinkPad E495 | `` | | Lenovo ThinkPad L13 | `` | | Lenovo ThinkPad P53 | `` | @@ -159,5 +160,5 @@ See code for all available configurations. ## How to contribute a new device profile 1. Add your device profile expression in the appropriate directory -2. Link it in the table in README.md +2. Link it in the table in README.md and in flake.nix 3. Run ./tests/run.py to test it. The test script script will parse all the profiles from the README.md diff --git a/flake.nix b/flake.nix index d34eab4..29114f1 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,7 @@ google-pixelbook = import ./google/pixelbook; inversepath-usbarmory = import ./inversepath/usbarmory; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; + lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; diff --git a/lenovo/thinkpad/e470/default.nix b/lenovo/thinkpad/e470/default.nix new file mode 100644 index 0000000..c9bf833 --- /dev/null +++ b/lenovo/thinkpad/e470/default.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/nvidia.nix + ]; + + hardware.nvidia.prime = { + # Bus ID of the Intel GPU. + intelBusId = lib.mkDefault "PCI:0:2:0"; + + # Bus ID of the NVIDIA GPU. + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + }; + + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.6") pkgs.linuxPackages_latest; +}