From d3ef6d0c7c0525d9d306d47245ae761904a6211f Mon Sep 17 00:00:00 2001 From: "Paepcke, Michael" Date: Fri, 28 Jun 2024 20:05:46 +0200 Subject: [PATCH 01/46] apple-macbookpro-14-1: update info, simplify and fix config --- apple/macbook-pro/14-1/README.md | 8 +++---- apple/macbook-pro/14-1/btfix.sh | 38 ------------------------------ apple/macbook-pro/14-1/default.nix | 30 +++-------------------- 3 files changed, 7 insertions(+), 69 deletions(-) delete mode 100755 apple/macbook-pro/14-1/btfix.sh diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md index 0a0e2df..d456ff2 100644 --- a/apple/macbook-pro/14-1/README.md +++ b/apple/macbook-pro/14-1/README.md @@ -1,10 +1,10 @@ -# MacBook Pro 14,1, NixOS 24.01 (2024) +# MacBook Pro 14,1, NixOS 24.05 (2024) ## Audio - [ ] Still broken, use usb/hdmi instead, nixos pkg needed: https://github.com/davidjo/snd_hda_macbookpro + [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 ## Bluetooth - [ ] Still broken, even (hacky) workaround does not work any more with latest driver updates + [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 ## Touchpad [x] Working, including 'disable while typing' usable quirk @@ -19,7 +19,7 @@ [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). ## Wifi - [x] Working (2,4Ghz & 5Ghz supported), WEP3 currently broken b/c old brcm fw + [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) ## Resources - https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file diff --git a/apple/macbook-pro/14-1/btfix.sh b/apple/macbook-pro/14-1/btfix.sh deleted file mode 100755 index f555bba..0000000 --- a/apple/macbook-pro/14-1/btfix.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -## -# For some reason /dev/ttyS0 is created, and then removed by udev. We need this -# for bluetooth, and the only way to get it again is to reload 8502_dw. Do so. -## - - -## -# /sys/devices/pci0000:00/0000:00:1e.0/driver -> intel-lpss -# /sys/bus/pci/devices/0000:00:1e.0 -# /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:8a/BCM2E7C:00 -## - -# udevadm info --query=all --path=/sys/bus/serial/devices/serial0-0 -# P: /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial0/serial0-0 -# M: serial0-0 -# R: 0 -# U: serial -# E: DEVPATH=/devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial0/serial0-0 -# E: SUBSYSTEM=serial -# E: MODALIAS=acpi:BCM2E7C:APPLE-UART-BLTH: -# E: USEC_INITIALIZED=12406199 -# E: PATH=/nix/store/56jhf2k9q31gwvhjxmm2akkkhi4a8nz1-udev-path/bin:/nix/store/56jhf2k9q31gwvhjxmm2akkkhi4a8nz1-udev-path/sbin -# E: ID_VENDOR_FROM_DATABASE=Broadcom - - -if [[ ! -e "/sys/devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/tty/ttyS0" ]]; then - if [[ -e /sys/module/8250_dw ]]; then - rmmod 8250_dw - fi - - modprobe 8250_dw -fi - -exec btattach --protocol=h4 --bredr=/dev/ttyS0 --speed=3000000 diff --git a/apple/macbook-pro/14-1/default.nix b/apple/macbook-pro/14-1/default.nix index 54a6e84..e2dcb72 100644 --- a/apple/macbook-pro/14-1/default.nix +++ b/apple/macbook-pro/14-1/default.nix @@ -5,10 +5,10 @@ ... }: { imports = [ + ../. ../../../common/cpu/intel/kaby-lake ../../../common/gpu/intel ../../../common/hidpi.nix - ../../../common/pc/laptop ../../../common/pc/laptop/ssd ../../../common/pc/laptop/acpi_call.nix ]; @@ -49,34 +49,10 @@ cpu.intel.updateMicrocode = lib.mkDefault true; }; - # Bluetooth, only needed if kernel lacks support - custom kernel build - # boot.kernelPatches = [ - # { - # name = "bcrm-config"; - # patch = null; - # extraConfig = '' - # BT_HCIUART_BCM y ''; - # } - # ]; - - ## [Workaround seems not to work anymore! Any Ideas?] - # For some reason /dev/ttyS0 is created, and then removed by udev. We need this - # for bluetooth, and the only way to get it again is to reload 8502_dw. Luckily, - # nothing else uses it. - ## - # systemd.services.btattach-bcm2e7c = lib.mkIf config.hardware.bluetooth.enable { - # before = [ "bluetooth.target" ]; - # after = [ "sys-devices-platform-serial8250-tty-ttyS1.device" ]; - # path = [ pkgs.bash pkgs.kmod pkgs.bluez ]; - # serviceConfig.Type = "simple"; - # serviceConfig.ExecStart = "${./btfix.sh}"; - # wantedBy = [ "multi-user.target" ]; - # }; - - ## [Enable only if needed!] + # [Enable only if needed!] # Disable d3cold on older NVME controller, only if needed # https://github.com/Dunedan/mbp-2016-linux - ## + # #systemd.services.disable-nvme-d3cold = { # description = "Disables d3cold on the NVME controller"; # before = [ "suspend.target" ]; From 40e296b2b3f6dc674191013c7583a67778228166 Mon Sep 17 00:00:00 2001 From: "Paepcke, Michael" Date: Fri, 28 Jun 2024 22:38:31 +0200 Subject: [PATCH 02/46] apple-imac-18-2: add imac, add imac-18-2 --- apple/imac/18-2/README.md | 26 ++++++++++++++++++++++++++ apple/imac/18-2/default.nix | 30 ++++++++++++++++++++++++++++++ apple/imac/default.nix | 8 ++++++++ 3 files changed, 64 insertions(+) create mode 100644 apple/imac/18-2/README.md create mode 100644 apple/imac/18-2/default.nix create mode 100644 apple/imac/default.nix diff --git a/apple/imac/18-2/README.md b/apple/imac/18-2/README.md new file mode 100644 index 0000000..6fdbb96 --- /dev/null +++ b/apple/imac/18-2/README.md @@ -0,0 +1,26 @@ +# iMac 18,2, NixOS 24.05 (2024) + +## Audio + [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 + +## Bluetooth + [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 + +## Thunderbolt + [x] ok + +## SATA + [x] ok + +## NVME + [x] ok, older NVME / Controller may need workaround for resume + +## Suspend/Resumer + [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). + +## Wifi + [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) + +## Resources (Intel iMac/MacBook share similar custom hardware) +- https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file +- https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6a92f9cd7 diff --git a/apple/imac/18-2/default.nix b/apple/imac/18-2/default.nix new file mode 100644 index 0000000..fbbfeba --- /dev/null +++ b/apple/imac/18-2/default.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + ../. + ../../../common/cpu/intel/kaby-lake + ../../../common/gpu/intel + ../../../common/gpu/amd + ../../../common/hidpi.nix + ../../../common/pc/laptop/ssd + ../../../common/pc/laptop/acpi_call.nix + ]; + + # apple smc (TODO: check spi) + boot = { + initrd.kernelModules = ["applespi" "spi_pxa2xx_platform" "intel_lpss_pci" "applesmc" ]; + kernelParams = [ "intel_iommu=on" ]; + kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest; + }; + + # Wifi, CPU Microcode FW updates + networking.enableB43Firmware = lib.mkDefault true; + hardware = { + enableRedistributableFirmware = lib.mkDefault true; + cpu.intel.updateMicrocode = lib.mkDefault true; + }; +} diff --git a/apple/imac/default.nix b/apple/imac/default.nix new file mode 100644 index 0000000..ea15175 --- /dev/null +++ b/apple/imac/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ../. + ../../common/cpu/intel + ../../common/pc/laptop + ../../common/pc/laptop/ssd + ]; +} From d33e3e71477521f50af926a3570527e9f2e37879 Mon Sep 17 00:00:00 2001 From: "Paepcke, Michael" Date: Fri, 28 Jun 2024 22:49:56 +0200 Subject: [PATCH 03/46] apple-imac-18-2: add flake support --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 159e2d1..e8472e4 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,7 @@ apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1; apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1; apple-macmini-4-1 = import ./apple/macmini/4; + apple-imac-18-2 = import ./apple/imac/18-2; apple-t2 = import ./apple/t2; asus-battery = import ./asus/battery.nix; asus-ally-rc71l = import ./asus/ally/rc71l; From d403b7f6ae7e513f1c7384b1dca80074a991a7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 30 Jun 2024 09:29:16 +0200 Subject: [PATCH 04/46] apple/imac/18-2/README.md: use markdown checkboxes --- apple/imac/18-2/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apple/imac/18-2/README.md b/apple/imac/18-2/README.md index 6fdbb96..6548ec8 100644 --- a/apple/imac/18-2/README.md +++ b/apple/imac/18-2/README.md @@ -1,25 +1,25 @@ # iMac 18,2, NixOS 24.05 (2024) ## Audio - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 +- [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 ## Bluetooth - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 +- [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 ## Thunderbolt - [x] ok +- [x] ok ## SATA - [x] ok +- [x] ok ## NVME - [x] ok, older NVME / Controller may need workaround for resume +- [x] ok, older NVME / Controller may need workaround for resume ## Suspend/Resumer - [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). +- [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). ## Wifi - [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) +- [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) ## Resources (Intel iMac/MacBook share similar custom hardware) - https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file From c6b440dcd63fdb65dbde486d41bf63ef228335b6 Mon Sep 17 00:00:00 2001 From: Michael Paepcke Date: Sun, 30 Jun 2024 08:14:43 +0000 Subject: [PATCH 05/46] apple/macbook-pro/14-1/README.md: use markdown checkboxes --- apple/macbook-pro/14-1/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md index d456ff2..2809d90 100644 --- a/apple/macbook-pro/14-1/README.md +++ b/apple/macbook-pro/14-1/README.md @@ -1,25 +1,25 @@ # MacBook Pro 14,1, NixOS 24.05 (2024) ## Audio - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 + - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 ## Bluetooth - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 + - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 ## Touchpad - [x] Working, including 'disable while typing' usable quirk + - [x] Working, including 'disable while typing' usable quirk ## Thunderbolt - [x] Working + - [x] Working ## NVME - [x] Working, older NVME / Controller may need workaround for resume + - [x] Working, older NVME / Controller may need workaround for resume ## Suspend/Resume - [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). + - [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes). ## Wifi - [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) + - [x] Working (2,4Ghz & 5Ghz supported), WEP3 broken -> brcm fw blob (2015) ## Resources - https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file From 6187754bdda54b330bfa46f383840221d2c5d9e4 Mon Sep 17 00:00:00 2001 From: Michael Paepcke Date: Mon, 15 Jul 2024 19:35:23 +0000 Subject: [PATCH 06/46] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- apple/macbook-pro/14-1/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md index 2809d90..216bb1d 100644 --- a/apple/macbook-pro/14-1/README.md +++ b/apple/macbook-pro/14-1/README.md @@ -4,7 +4,7 @@ - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 ## Bluetooth - - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 + - [ ] broken lands https://github.com/NixOS/nixpkgs/pull/322964 in master ## Touchpad - [x] Working, including 'disable while typing' usable quirk From ea9f6719b17ab3a13271ed1d1306b174b19f510b Mon Sep 17 00:00:00 2001 From: Michael Paepcke Date: Mon, 15 Jul 2024 19:35:33 +0000 Subject: [PATCH 07/46] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- apple/macbook-pro/14-1/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/macbook-pro/14-1/README.md b/apple/macbook-pro/14-1/README.md index 216bb1d..ce74d7c 100644 --- a/apple/macbook-pro/14-1/README.md +++ b/apple/macbook-pro/14-1/README.md @@ -1,7 +1,7 @@ # MacBook Pro 14,1, NixOS 24.05 (2024) ## Audio - - [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 + - [ ] broken until https://github.com/NixOS/nixpkgs/pull/322968 lands in master ## Bluetooth - [ ] broken lands https://github.com/NixOS/nixpkgs/pull/322964 in master From 37d3f20674ad0d7ecc0367345ede6c550d1be819 Mon Sep 17 00:00:00 2001 From: Michael Paepcke Date: Mon, 15 Jul 2024 19:35:43 +0000 Subject: [PATCH 08/46] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörg Thalheim --- apple/imac/18-2/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/imac/18-2/README.md b/apple/imac/18-2/README.md index 6548ec8..7ed259b 100644 --- a/apple/imac/18-2/README.md +++ b/apple/imac/18-2/README.md @@ -1,10 +1,10 @@ # iMac 18,2, NixOS 24.05 (2024) ## Audio -- [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322968 +- [ ] broken until https://github.com/NixOS/nixpkgs/pull/322968 lands in master ## Bluetooth -- [ ] broken, PR pending: https://github.com/NixOS/nixpkgs/pull/322964 +- [ ] broken until https://github.com/NixOS/nixpkgs/pull/322964 lands in master ## Thunderbolt - [x] ok From 9a187879f47ba2cad0f737913d99ebc893125ee6 Mon Sep 17 00:00:00 2001 From: toastal Date: Thu, 18 Jul 2024 17:03:33 +0000 Subject: [PATCH 09/46] lenovo-thinkpad-z13-gen2: move to asound.conf `sound.*` was removed upstream in Nixpkgs --- lenovo/thinkpad/z/gen2/z13/asound.conf | 9 +++++++++ lenovo/thinkpad/z/gen2/z13/default.nix | 12 +----------- 2 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 lenovo/thinkpad/z/gen2/z13/asound.conf diff --git a/lenovo/thinkpad/z/gen2/z13/asound.conf b/lenovo/thinkpad/z/gen2/z13/asound.conf new file mode 100644 index 0000000..e977df7 --- /dev/null +++ b/lenovo/thinkpad/z/gen2/z13/asound.conf @@ -0,0 +1,9 @@ +pcm.!default { + type plug + slave.pcm "hw:1,0" +} + +ctl.!default { + type hw + card 1 +} diff --git a/lenovo/thinkpad/z/gen2/z13/default.nix b/lenovo/thinkpad/z/gen2/z13/default.nix index 5eb6ef0..636d2e0 100644 --- a/lenovo/thinkpad/z/gen2/z13/default.nix +++ b/lenovo/thinkpad/z/gen2/z13/default.nix @@ -5,15 +5,5 @@ ../../../../../lenovo/thinkpad/z/gen2 ]; - sound.extraConfig = '' - pcm.!default { - type plug - slave.pcm "hw:1,0" - } - - ctl.!default { - type hw - card 1 - } - ''; + environment.etc."asound.conf".source = ./asound.conf; } From 9a816e3d1c0649a7c88370c8eb80071f5891a4d8 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 12 Jul 2024 20:26:26 +0200 Subject: [PATCH 10/46] asus-rog-strix-g713ie: init update README for asus rog-strix g713ie --- README.md | 1 + asus/rog-strix/g713ie/default.nix | 16 ++++++++++++++++ flake.nix | 1 + 3 files changed, 18 insertions(+) create mode 100644 asus/rog-strix/g713ie/default.nix diff --git a/README.md b/README.md index de376d4..3a9c33c 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ See code for all available configurations. | [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `` | | [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `` | | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | +| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | diff --git a/asus/rog-strix/g713ie/default.nix b/asus/rog-strix/g713ie/default.nix new file mode 100644 index 0000000..e36585c --- /dev/null +++ b/asus/rog-strix/g713ie/default.nix @@ -0,0 +1,16 @@ +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/nvidia + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../battery.nix + ]; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:5:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} diff --git a/flake.nix b/flake.nix index 6c1a300..23007f9 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,7 @@ asus-fa507rm = import ./asus/fa507rm; asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-rog-strix-g513im = import ./asus/rog-strix/g513im; + asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; asus-zenbook-ux371 = import ./asus/zenbook/ux371; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; From 108f27f71e67f43c74d2c2737749556fd6380341 Mon Sep 17 00:00:00 2001 From: jjtt <3908945+jjtt@users.noreply.github.com> Date: Thu, 18 Jul 2024 21:58:17 +0300 Subject: [PATCH 11/46] Remove BTRFS related setting The note about BTRFS has been removed from the linked Arch wiki page in January 2021 with a comment: > Removing note about problems with Btrfs and ALPM, since issues have been fixed in the kernel (4.15 -> https://www.spinics.net/lists/linux-btrfs/msg101833.html)) See: https://wiki.archlinux.org/index.php?title=TLP&oldid=650059 --- lenovo/thinkpad/x260/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lenovo/thinkpad/x260/default.nix b/lenovo/thinkpad/x260/default.nix index c11ef98..409986d 100644 --- a/lenovo/thinkpad/x260/default.nix +++ b/lenovo/thinkpad/x260/default.nix @@ -9,9 +9,4 @@ # https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X260#Thinkpad_X260 "i915.enable_psr=0" ]; - - # https://wiki.archlinux.org/index.php/TLP#Btrfs - services.tlp.settings = { - SATA_LINKPWR_ON_BAT = "med_power_with_dipm"; - }; } From 3501b9c0962d0644041cd4e9243f817c1d7418ba Mon Sep 17 00:00:00 2001 From: Niklas Gollenstede Date: Thu, 18 Jul 2024 00:14:16 +0200 Subject: [PATCH 12/46] flake.nix: export paths instead of imported files --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 23007f9..a6ea727 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ outputs = _: { nixosModules = let deprecated = issue: name: value: builtins.trace "warning: ${name} flake output is deprecated and will be removed. See https://github.com/NixOS/nixos-hardware/issues/${issue} for more information" value; + import = path: path; # let the module system know what we are exporting in { acer-aspire-4810t = import ./acer/aspire/4810t; airis-n990 = import ./airis/n990; From d8bfbbf614881a110059f14bc2a5d28c5df115e5 Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Thu, 18 Jul 2024 15:58:55 +0100 Subject: [PATCH 13/46] fix: Add more aliases to 24.05-compat We're using these options too, which breaks builds without this commit. Fixes: #1045 Signed-off-by: Dom Rodriguez --- common/gpu/24.05-compat.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/gpu/24.05-compat.nix b/common/gpu/24.05-compat.nix index 3e3495f..1750888 100644 --- a/common/gpu/24.05-compat.nix +++ b/common/gpu/24.05-compat.nix @@ -9,5 +9,7 @@ (lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ]) (lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ]) (lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ]) + (lib.mkAliasOptionModule [ "hardware" "graphics" "package" ] [ "hardware" "opengl" "package" ]) + (lib.mkAliasOptionModule [ "hardware" "graphics" "package32" ] [ "hardware" "opengl" "package32" ]) ]; } From 71b92eab15920df202dd6256c2e2a58cc6e48641 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 18 Jul 2024 11:01:12 -0300 Subject: [PATCH 14/46] asus-rog-strix-x570: init Spec: https://rog.asus.com/motherboards/rog-strix/rog-strix-x570-e-gaming-model/spec/ --- README.md | 1 + asus/rog-strix/x570e/default.nix | 14 ++++++++++++++ flake.nix | 1 + 3 files changed, 16 insertions(+) create mode 100644 asus/rog-strix/x570e/default.nix diff --git a/README.md b/README.md index 3a9c33c..12f3bec 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ See code for all available configurations. | [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `` | | [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `` | | [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `` | | [Asus ROG Zephyrus G14 GA402X* (2023)](asus/zephyrus/ga402x/amdgpu) | `` | diff --git a/asus/rog-strix/x570e/default.nix b/asus/rog-strix/x570e/default.nix new file mode 100644 index 0000000..d8ee657 --- /dev/null +++ b/asus/rog-strix/x570e/default.nix @@ -0,0 +1,14 @@ +# Motherboard: ROG STRIX X570-E GAMING +{ ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/cpu/amd/zenpower.nix + ../../../common/pc/ssd + ]; + + # Bluetooth driver for Intel AX200 802.11ax + boot.kernelModules = [ "btintel" ]; +} diff --git a/flake.nix b/flake.nix index a6ea727..545253a 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,7 @@ asus-rog-strix-g513im = import ./asus/rog-strix/g513im; asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie; asus-rog-strix-g733qs = import ./asus/rog-strix/g733qs; + asus-rog-strix-x570e = import ./asus/rog-strix/x570e; asus-zenbook-ux371 = import ./asus/zenbook/ux371; asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; From 89a33c8e93a64d4f65ca3a2c7bc9da24216aa0b9 Mon Sep 17 00:00:00 2001 From: Nico Elbers Date: Mon, 1 Jul 2024 23:22:53 +0200 Subject: [PATCH 15/46] omen 16-n0280nd: init --- flake.nix | 1 + omen/16-n0280nd/README.md | 5 +++++ omen/16-n0280nd/default.nix | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 omen/16-n0280nd/README.md create mode 100644 omen/16-n0280nd/default.nix diff --git a/flake.nix b/flake.nix index 545253a..5eddd5a 100644 --- a/flake.nix +++ b/flake.nix @@ -232,6 +232,7 @@ omen-14-fb0798ng = import ./omen/14-fb0798ng; omen-15-en0010ca = import ./omen/15-en0010ca; omen-16-n0005ne = import ./omen/16-n0005ne; + omen-16-n0280nd = import ./omen/16-n0280nd; omen-15-en1007sa = import ./omen/15-en1007sa; omen-15-en0002np = import ./omen/15-en0002np; onenetbook-4 = import ./onenetbook/4; diff --git a/omen/16-n0280nd/README.md b/omen/16-n0280nd/README.md new file mode 100644 index 0000000..1fa601c --- /dev/null +++ b/omen/16-n0280nd/README.md @@ -0,0 +1,5 @@ +# HP Omen 16-n0280nd + +## ACPI platform profiles + +This config enables `hp-wmi`, which allows switch between cool, balanced, and performance modes on the platform EC, used by power management tools like `power-profile-daemon` and `tlp`. diff --git a/omen/16-n0280nd/default.nix b/omen/16-n0280nd/default.nix new file mode 100644 index 0000000..3929c66 --- /dev/null +++ b/omen/16-n0280nd/default.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../common/cpu/amd + ../../common/cpu/amd/pstate.nix + ../../common/gpu/nvidia/prime.nix + ../../common/pc/laptop + ../../common/pc/ssd + ]; + + # Enables ACPI platform profiles + boot = lib.mkIf (lib.versionAtLeast pkgs.linux.version "6.1") { + kernelModules = [ "hp-wmi" ]; + }; + + hardware.nvidia.prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; +} From ece5b120143233d5d19a5e6034ae8bc879c21e7a Mon Sep 17 00:00:00 2001 From: Nico Elbers Date: Tue, 9 Jul 2024 20:43:37 +0200 Subject: [PATCH 16/46] update README for omen 16-n0280nd --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 12f3bec..727a119 100644 --- a/README.md +++ b/README.md @@ -292,6 +292,7 @@ See code for all available configurations. | [Omen 15-en0010ca](omen/14-fb0798ng) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen 16-n0005ne](omen/16-n0005ne) | `` | +| [Omen 16-n0280nd](/omen/16-n0280nd) | `` | | [Omen 15-en1007sa](omen/15-en1007sa) | `` | | [Omen 15-en0002np](omen/15-en0002np) | `` | | [One-Netbook OneNetbook 4](onenetbook/4) | `` | From 19e9c2fb7a9877f2864922276cd6ca62b07fa37a Mon Sep 17 00:00:00 2001 From: liamwb Date: Tue, 9 Jul 2024 14:02:17 +1000 Subject: [PATCH 17/46] naively pasted code from our forum discussion --- dell/xps/15-9560/default.nix | 42 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index aee5665..18be8fd 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -4,36 +4,30 @@ ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix - - # FIXME: remove this when bumblebee works again - ../../../common/gpu/nvidia/disable.nix ]; +# enable opengpl and gpu drivers + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; - /* Bumblebee seems to fail to evaluate: - (stack trace truncated; use '--show-trace' to show the full trace) + services.xserver.videoDrivers = ["nvidia"]; - error: assertion '(useSettings -> (! libsOnly))' failed + hardware.nvidia.modesetting.enable = true; - at /home/joerg/git/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix:61:1: + hardware.nvidia.prime = { + offload = { + enable = true; + enableOffloadCmd = true; # provides the nvidia-offload command + }; - 60| - 61| assert useSettings -> !libsOnly; - | ^ - 62| assert !libsOnly -> kernel != null; +# integrated + intelBusId = "PCI:0:2:0"; - # This configuration makes intel default and optionaly applications could run nvidia with optirun. - # To Optimize for your use case import intel or nvidia only configuration instead - # xps-9560/intel - # or - # xps-9560/nvidia +# dedicated + nvidiaBusId = "PCI:1:0:0"; + }; - - ##### bumblebee working, needs reboot to take affect and to use it run: optirun "" - services.xserver.videoDrivers = [ "intel" "nvidia" ]; - boot.blacklistedKernelModules = [ "nouveau" "bbswitch" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; - hardware.bumblebee.enable = lib.mkDefault true; - hardware.bumblebee.pmMethod = lib.mkDefault "none"; - */ } From 42577dbb0f75c1288a26864e40da32a0d67de853 Mon Sep 17 00:00:00 2001 From: liamwb Date: Tue, 9 Jul 2024 14:13:07 +1000 Subject: [PATCH 18/46] removed parts that are included in other modules --- dell/xps/15-9560/default.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 18be8fd..d776fa5 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -4,30 +4,22 @@ ../../../common/gpu/intel/kaby-lake ../../../common/pc/laptop ./xps-common.nix + ../../../common/gpu/nvidia ]; -# enable opengpl and gpu drivers hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; }; - services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia.modesetting.enable = true; hardware.nvidia.prime = { - offload = { - enable = true; - enableOffloadCmd = true; # provides the nvidia-offload command - }; - -# integrated + # integrated intelBusId = "PCI:0:2:0"; -# dedicated + # dedicated nvidiaBusId = "PCI:1:0:0"; }; - } From 6a4ecebce56727d0ae538b1277725cb03181124e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Jul 2024 10:43:32 +0200 Subject: [PATCH 19/46] dell/xps/15-9560: use graphics option --- dell/xps/15-9560/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index d776fa5..6ad58f7 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -7,7 +7,7 @@ ../../../common/gpu/nvidia ]; - hardware.opengl = { + hardware.graphics = { enable = true; driSupport = true; driSupport32Bit = true; From 05672b50f70e47df282e974e07534d38df4f8fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 9 Jul 2024 10:48:01 +0200 Subject: [PATCH 20/46] dell/xps/15-9560: fix graphics options --- dell/xps/15-9560/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dell/xps/15-9560/default.nix b/dell/xps/15-9560/default.nix index 6ad58f7..510feab 100644 --- a/dell/xps/15-9560/default.nix +++ b/dell/xps/15-9560/default.nix @@ -7,11 +7,7 @@ ../../../common/gpu/nvidia ]; - hardware.graphics = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; + hardware.graphics.enable = true; hardware.nvidia.modesetting.enable = true; From ab165a8a6cd12781d76fe9cbccb9e975d0fb634f Mon Sep 17 00:00:00 2001 From: Lyndon Sanche Date: Tue, 2 Jul 2024 11:48:10 -0600 Subject: [PATCH 21/46] codeowners: Add Lyndeno for XPS-9560 This is my daily driver and I foresee this to be the case for a long while. Contributions directly to this model: - #691 - #696 Contributions indirectly affecting this model: - #692 --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index 4525d6b..b197a5b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,6 +1,7 @@ beagleboard/pocketbeagle @yegortimoshenko dell/xps/13-9370 @moredread dell/xps/13-9380 @kalbasit +dell/xps/15-9560 @Lyndeno lenovo/thinkpad/x230 @makefu @yegortimoshenko lenovo/thinkpad/x250 @Mic92 pcengines/apu @yegortimoshenko From 405b654893aba16c8014de6a17e84439d3fb8e46 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 23 Jul 2024 22:11:15 +1200 Subject: [PATCH 22/46] Add Lenovo Thinkpad T14 Gen5 - Which is basically the same as Gen4 ... --- flake.nix | 1 + lenovo/thinkpad/t14/amd/gen5/default.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 lenovo/thinkpad/t14/amd/gen5/default.nix diff --git a/flake.nix b/flake.nix index 5eddd5a..e2ec5ed 100644 --- a/flake.nix +++ b/flake.nix @@ -157,6 +157,7 @@ lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3; lenovo-thinkpad-t14-amd-gen4 = import ./lenovo/thinkpad/t14/amd/gen4; + lenovo-thinkpad-t14-amd-gen5 = import ./lenovo/thinkpad/t14/amd/gen5; lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4; diff --git a/lenovo/thinkpad/t14/amd/gen5/default.nix b/lenovo/thinkpad/t14/amd/gen5/default.nix new file mode 100644 index 0000000..e61a3a0 --- /dev/null +++ b/lenovo/thinkpad/t14/amd/gen5/default.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, config, ... }: + +{ + imports = [ + ../. + ../../../../../common/cpu/amd/pstate.nix + ]; + + # For the Qualcomm NFA765 [17cb:1103] wireless network controller + # See https://bugzilla.redhat.com/show_bug.cgi?id=2047878 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.16") pkgs.linuxPackages_latest; +} From b501c5fbf657b4bbe2a61a66fc1483ad0ec40d7b Mon Sep 17 00:00:00 2001 From: Arne Cuperus Date: Wed, 24 Jul 2024 18:01:51 +0200 Subject: [PATCH 23/46] Add configuration for Lenovo IdeaPad Gaming 3 15ach6 --- README.md | 1 + flake.nix | 1 + lenovo/ideapad/15ach6/README.md | 25 +++++++++++++++++++++++++ lenovo/ideapad/15ach6/default.nix | 20 ++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 lenovo/ideapad/15ach6/README.md create mode 100644 lenovo/ideapad/15ach6/default.nix diff --git a/README.md b/README.md index 727a119..ea97ab6 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ See code for all available configurations. | [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `` | | [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `` | | [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `` | +| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `` | | [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `` | | [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `` | | [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `` | diff --git a/flake.nix b/flake.nix index e2ec5ed..7bbbe12 100644 --- a/flake.nix +++ b/flake.nix @@ -112,6 +112,7 @@ intel-nuc-8i7beh = import ./intel/nuc/8i7beh; lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6; lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05; + lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6; lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6; lenovo-ideapad-z510 = import ./lenovo/ideapad/z510; lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5; diff --git a/lenovo/ideapad/15ach6/README.md b/lenovo/ideapad/15ach6/README.md new file mode 100644 index 0000000..e429908 --- /dev/null +++ b/lenovo/ideapad/15ach6/README.md @@ -0,0 +1,25 @@ +# Lenovo IdeaPad Gaming 3 15ACH6 + +This device supports "battery conservation mode", which charges the battery to only ~60%. This mode can be enabled using [TLP](https://linrunner.de/tlp/settings/bc-vendors.html#lenovo-non-thinkpad-series): + +## Device information + +Details from `tlp-stat`: + +``` +System = LENOVO IdeaPad Gaming 3 15ACH6 82K2 +BIOS = H3CN31WW(V2.01) +EC Firmware = 1.31 +OS Release = NixOS 24.11 (Vicuna) +Kernel = 6.6.37 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jul 5 07:34:07 UTC 2024 x86_64 +Init system = systemd +Boot mode = UEFI +Suspend mode = s2idle [deep] +``` + +`lspci` output: + +``` +01:00.0 3D controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1) +06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c6) +``` diff --git a/lenovo/ideapad/15ach6/default.nix b/lenovo/ideapad/15ach6/default.nix new file mode 100644 index 0000000..c771f1b --- /dev/null +++ b/lenovo/ideapad/15ach6/default.nix @@ -0,0 +1,20 @@ +{ lib, ... }: + +{ + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + hardware.nvidia = { + modesetting.enable = true; + prime = { + amdgpuBusId = "PCI:6:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; +} From a7432ebaefc9a400dcda399d48b949230378d784 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 21 Jul 2024 15:06:36 +0200 Subject: [PATCH 24/46] framework/16-inch: Mark keyboard as internal for libinput This addition tells libinput that the built-in keyboard is indeed internal, allowing the "Disable-While-Typing" setting to take effect. The method is explained at https://linuxtouchpad.org/libinput/2022/05/07/disable-while-typing.html. --- framework/16-inch/common/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/framework/16-inch/common/default.nix b/framework/16-inch/common/default.nix index 547f98f..07e5162 100644 --- a/framework/16-inch/common/default.nix +++ b/framework/16-inch/common/default.nix @@ -26,4 +26,14 @@ # Enable keyboard customization hardware.keyboard.qmk.enable = lib.mkDefault true; + + # Allow `services.libinput.touchpad.disableWhileTyping` to work correctly. + # Set unconditionally because libinput can also be configured dynamically via + # gsettings. + environment.etc."libinput/local-overrides.quirks".text = '' + [Serial Keyboards] + MatchUdevType=keyboard + MatchName=Framework Laptop 16 Keyboard Module - ANSI Keyboard + AttrKeyboardIntegration=internal + ''; } From 39ac67a5feba7ac99165e39a6def08da39de5da5 Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Wed, 24 Jul 2024 21:47:52 -0400 Subject: [PATCH 25/46] surface: fix isVersionOf check --- microsoft/surface/common/kernel/linux-package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/common/kernel/linux-package.nix b/microsoft/surface/common/kernel/linux-package.nix index 45b4734..b179fcb 100644 --- a/microsoft/surface/common/kernel/linux-package.nix +++ b/microsoft/surface/common/kernel/linux-package.nix @@ -48,7 +48,7 @@ let isVersionOf = kernelVersion: version: # Test if the provided version is considered one of the list of versions from above: - elem version (versionsOf version); + elem kernelVersion (versionsOf version); in { inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfEnum; From 226e517854aec947b139e28e9edb6394fe256d32 Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Wed, 24 Jul 2024 22:37:46 -0400 Subject: [PATCH 26/46] surface: fix default kernel version --- microsoft/surface/common/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 057142c..daf9304 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -8,7 +8,7 @@ in { ./kernel ]; - microsoft-surface.kernelVersion = mkDefault "6.6"; + microsoft-surface.kernelVersion = mkDefault "6.9"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; From 5bd0371d3ff4c121b03450de8cfd643547b11fe1 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 23 Jul 2024 14:31:45 +1200 Subject: [PATCH 27/46] Create lenovo-yoga-7-14ARH7-amdgpu and lenovo-yoga-7-14ARH7-nvidia entries - Previous attr-set style providing "amdgpu" and "nvidia" is broken by PR #1046 - Add deprecation assertion for lenovo-yoga-7-14ARH7 --- flake.nix | 2 ++ lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md | 16 ++++++++++++++++ lenovo/yoga/7/14ARH7/default.nix | 19 +++++++------------ 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md diff --git a/flake.nix b/flake.nix index caa4a71..64d4913 100644 --- a/flake.nix +++ b/flake.nix @@ -212,6 +212,8 @@ lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13; lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6; lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7; + lenovo-yoga-7-14ARH7-amdgpu = import ./lenovo/yoga/7/14ARH7/amdgpu; + lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia; lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8; letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microchip-icicle-kit = import ./microchip/icicle-kit; diff --git a/lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md b/lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md new file mode 100644 index 0000000..9ef5239 --- /dev/null +++ b/lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md @@ -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) diff --git a/lenovo/yoga/7/14ARH7/default.nix b/lenovo/yoga/7/14ARH7/default.nix index 851033c..36605a1 100644 --- a/lenovo/yoga/7/14ARH7/default.nix +++ b/lenovo/yoga/7/14ARH7/default.nix @@ -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"; + } + ]; } From 13d6cbde4dc271aa35747c5cee4926280c330a26 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 22 Jul 2024 00:10:45 +1200 Subject: [PATCH 28/46] Create asus-zephyrus-ga402x-amdgpu and asus-zephyrus-ga402x-nvidia entries - Previous attr-set style providing "amdgpu" and "nvidia" is broken by PR #1046 - Add deprecation assertion for asus-zephyrus-ga402x --- asus/zephyrus/ga402x/default.nix | 19 +++++++------------ flake.nix | 2 ++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/asus/zephyrus/ga402x/default.nix b/asus/zephyrus/ga402x/default.nix index 7e49eb6..a77e24d 100644 --- a/asus/zephyrus/ga402x/default.nix +++ b/asus/zephyrus/ga402x/default.nix @@ -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.asus-zephyrus-ga402x.amdgpu -# ]; -# -## or: -# imports = [ -# nixos-hardware.nixosModules.asus-zephyrus-ga402x.nvidia -# ]; +{ ... }: { - amdgpu = import ./amdgpu; - nvidia = import ./nvidia; + assertions = [ + { + assertion = false; + message = "Importing asus/zephyrus/ga402x/ (default.nix) directly is deprecated! #TODO: More details"; + } + ]; } diff --git a/flake.nix b/flake.nix index 64d4913..3754e48 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,8 @@ asus-zephyrus-ga401 = import ./asus/zephyrus/ga401; asus-zephyrus-ga402 = import ./asus/zephyrus/ga402; asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x; + asus-zephyrus-ga402x-amdgpu = import ./asus/zephyrus/ga402x/amdgpu; + asus-zephyrus-ga402x-nvidia = import ./asus/zephyrus/ga402x/nvidia; asus-zephyrus-ga502 = import ./asus/zephyrus/ga502; asus-zephyrus-ga503 = import ./asus/zephyrus/ga503; asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h; From 60d3bae3845050d36328fbfc9a0e95b82a25f2f1 Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 22 Jul 2024 00:40:46 +1200 Subject: [PATCH 29/46] Add deprecation explanation --- asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md | 16 ++++++++++++++++ asus/zephyrus/ga402x/default.nix | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md diff --git a/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md b/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md new file mode 100644 index 0000000..21d3d1e --- /dev/null +++ b/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md @@ -0,0 +1,16 @@ +# Deprecation of //asus/zephyrus/ga402x/default.nix + +Background: +The `asus-zephyrus-ga402x` 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 `asus-zephyrus-ga402x.amdgpu` with a `asus-zephyrus-ga402x-amdgpu` entry. +- Replaced `asus-zephyrus-ga402x.nvidia` with a `asus-zephyrus-ga402x-nvidia` entry. +- Made `asus-zephyrus-ga402x` throw a deprecation error. +- [FIXES: #1052](https://github.com/NixOS/nixos-hardware/issues/1052) diff --git a/asus/zephyrus/ga402x/default.nix b/asus/zephyrus/ga402x/default.nix index a77e24d..e4e681e 100644 --- a/asus/zephyrus/ga402x/default.nix +++ b/asus/zephyrus/ga402x/default.nix @@ -4,7 +4,7 @@ assertions = [ { assertion = false; - message = "Importing asus/zephyrus/ga402x/ (default.nix) directly is deprecated! #TODO: More details"; + message = "Importing asus/zephyrus/ga402x/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md for more details"; } ]; } From d3c993c851ad40bbab7e08d566138ff72cd8744f Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Wed, 24 Jul 2024 00:02:24 +0800 Subject: [PATCH 30/46] Lenovo ThinkPad X1 (12th Gen): init --- README.md | 1 + flake.nix | 1 + lenovo/thinkpad/x1/12th-gen/default.nix | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 lenovo/thinkpad/x1/12th-gen/default.nix diff --git a/README.md b/README.md index ea97ab6..5c1a6ab 100644 --- a/README.md +++ b/README.md @@ -251,6 +251,7 @@ See code for all available configurations. | [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `` | | [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `` | | [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `` | +| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `` | | [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `` | | [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `` | | [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `` | diff --git a/flake.nix b/flake.nix index 3754e48..0be7245 100644 --- a/flake.nix +++ b/flake.nix @@ -191,6 +191,7 @@ lenovo-thinkpad-x1-9th-gen = import ./lenovo/thinkpad/x1/9th-gen; lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-gen; lenovo-thinkpad-x1-11th-gen = import ./lenovo/thinkpad/x1/11th-gen; + lenovo-thinkpad-x1-12th-gen = import ./lenovo/thinkpad/x1/12th-gen; lenovo-thinkpad-x1-extreme = import ./lenovo/thinkpad/x1-extreme; lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2; lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4; diff --git a/lenovo/thinkpad/x1/12th-gen/default.nix b/lenovo/thinkpad/x1/12th-gen/default.nix new file mode 100644 index 0000000..7d17c71 --- /dev/null +++ b/lenovo/thinkpad/x1/12th-gen/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ../. + ../../../../common/pc/laptop/ssd + ]; + + hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint"; +} From 109174381137e88eae61a3537e07e9ef58ba6a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tracteur=20Blind=C3=A9?= Date: Wed, 24 Jul 2024 14:48:45 -0700 Subject: [PATCH 31/46] surface: linux-surface arch-6.9.3-1 to arch-6.9.9-1 --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 313f133..8e60ee9 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.9.3-1"; - hash = "sha256-HoG7MuWAtiTAX9CJeqCGrfkfoue7XLtSMF6zjx4z7i8="; + rev = "arch-6.9.9-1"; + hash = "sha256-L7o2tqtO5wkTSWaL44SgNeorPdoNjSpM1GDdI7khnSo="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 0b4d40f95a68ef0a6785f6b938ac8c1383321dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tracteur=20Blind=C3=A9?= Date: Wed, 24 Jul 2024 14:49:05 -0700 Subject: [PATCH 32/46] surface: linux 6.9.3 -> 6.9.9 --- microsoft/surface/common/kernel/linux-6.9.x/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.9.x/default.nix b/microsoft/surface/common/kernel/linux-6.9.x/default.nix index c0fd5c9..164d59e 100644 --- a/microsoft/surface/common/kernel/linux-6.9.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.9.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.9.3"; + version = "6.9.9"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "1bnzxparybwh320019pr2msaapas41dhjmvg4gy791rn05jc88f3"; + sha256 = "1f8y88rif3z5lp1bq00g66fd0xs1227qlqkxd2zs6fdjgr45pq1b"; ignoreConfigErrors=true; }; From b7b55739f75fd5eaca6b1867d11919896d9b404b Mon Sep 17 00:00:00 2001 From: Eric Thomas Date: Fri, 26 Jul 2024 20:53:48 -0230 Subject: [PATCH 33/46] fix link text for Omen 14-fb0798ng --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c1a6ab..1992563 100644 --- a/README.md +++ b/README.md @@ -291,7 +291,7 @@ See code for all available configurations. | [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `` | | [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `` | | [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `` | -| [Omen 15-en0010ca](omen/14-fb0798ng) | `` | +| [Omen 14-fb0798ng](omen/14-fb0798ng) | `` | | [Omen 15-en0010ca](omen/15-en0010ca) | `` | | [Omen 16-n0005ne](omen/16-n0005ne) | `` | | [Omen 16-n0280nd](/omen/16-n0280nd) | `` | From eab049fe178c11395d65a858ba1b56461ba9652d Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sun, 28 Jul 2024 17:26:18 +0200 Subject: [PATCH 34/46] surface: linux 6.9.9 -> 6.9.12 --- microsoft/surface/common/kernel/linux-6.9.x/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/kernel/linux-6.9.x/default.nix b/microsoft/surface/common/kernel/linux-6.9.x/default.nix index 164d59e..4006025 100644 --- a/microsoft/surface/common/kernel/linux-6.9.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.9.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.9.9"; + version = "6.9.12"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "1f8y88rif3z5lp1bq00g66fd0xs1227qlqkxd2zs6fdjgr45pq1b"; + sha256 = "08ngskni7d9wi93vlwcmbdg7sb2jl1drhhzn62k9nsrg1r7crrss"; ignoreConfigErrors=true; }; From 14c333162ba53c02853add87a0000cbd7aa230c2 Mon Sep 17 00:00:00 2001 From: Ali Rizvi Date: Mon, 29 Jul 2024 17:37:28 -0400 Subject: [PATCH 35/46] treewide: remove uses of lib.mdDoc --- common/gpu/intel/default.nix | 5 ++--- framework/kmod.nix | 4 ++-- gpd/win-max-2/2023/bmi260/default.nix | 2 +- gpd/win-max-2/default.nix | 2 +- purism/librem/5r4/default.nix | 10 +++++----- raspberry-pi/4/digi-amp-plus.nix | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index be5a8c8..54f4eec 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -16,9 +16,8 @@ }; options.hardware.intelgpu.loadInInitrd = - lib.mkEnableOption ( - lib.mdDoc "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)" - ) + lib.mkEnableOption + "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)" // { default = true; }; diff --git a/framework/kmod.nix b/framework/kmod.nix index 81ce37a..a6c30eb 100644 --- a/framework/kmod.nix +++ b/framework/kmod.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.hardware.framework.enableKmod = lib.mkEnableOption (lib.mdDoc + options.hardware.framework.enableKmod = lib.mkEnableOption "Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs." - ) // { + // { # Enable by default if on new enough version of NixOS default = (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05"); }; diff --git a/gpd/win-max-2/2023/bmi260/default.nix b/gpd/win-max-2/2023/bmi260/default.nix index bbce72e..099367a 100644 --- a/gpd/win-max-2/2023/bmi260/default.nix +++ b/gpd/win-max-2/2023/bmi260/default.nix @@ -18,7 +18,7 @@ in hardware.sensor.iio.bmi260.enable = mkOption { default = false; type = types.bool; - description = mdDoc '' + description = '' Enable Bosch BMI260 IMU kernel module driver. ''; }; diff --git a/gpd/win-max-2/default.nix b/gpd/win-max-2/default.nix index ae821a3..d7ff52d 100644 --- a/gpd/win-max-2/default.nix +++ b/gpd/win-max-2/default.nix @@ -15,7 +15,7 @@ in # NOTICE: Whenever you can limit PPT to 15W by pressing Fn + Shift to enter quiet mode. options.hardware.gpd.ppt = { - enable = mkEnableOption (mdDoc "Enable PPT control for device by ryzenadj.") // { + enable = mkEnableOption "Enable PPT control for device by ryzenadj." // { # Default increase PPT to the BIOS default when power adapter plugin to increase performance. default = true; }; diff --git a/purism/librem/5r4/default.nix b/purism/librem/5r4/default.nix index 76854a6..339b43b 100644 --- a/purism/librem/5r4/default.nix +++ b/purism/librem/5r4/default.nix @@ -12,18 +12,18 @@ in { }; wifiCard = lib.mkOption { type = lib.types.enum [ "redpine" "sparklan" "none" ]; - description = lib.mdDoc '' + description = '' Which wi-fi card is installed in your phone. Phones shipped before January 2023 have redpine, newer phones have sparklan. ''; default = "redpine"; }; - customInitrdModules = lib.mkEnableOption (lib.mdDoc "use of custom kernel modules in the initrd."); - installUdevPackages = lib.mkEnableOption (lib.mdDoc "installation of udev packages from librem5-base."); - lockdownFix = lib.mkEnableOption (lib.mdDoc "fix for orientation and proximity sensors not working after lockdown."); + customInitrdModules = lib.mkEnableOption "use of custom kernel modules in the initrd."; + installUdevPackages = lib.mkEnableOption "installation of udev packages from librem5-base."; + lockdownFix = lib.mkEnableOption "fix for orientation and proximity sensors not working after lockdown."; audio = lib.mkOption { - description = lib.mdDoc '' + description = '' Whether to enable and configure PulseAudio for the Librem5 modem. This is required for audio during calls to work at all. diff --git a/raspberry-pi/4/digi-amp-plus.nix b/raspberry-pi/4/digi-amp-plus.nix index e9df06d..3c19f3a 100644 --- a/raspberry-pi/4/digi-amp-plus.nix +++ b/raspberry-pi/4/digi-amp-plus.nix @@ -13,7 +13,7 @@ in unmuteAmp = lib.mkOption { type = lib.types.bool; default = false; - description = lib.mdDoc '' + description = '' "one-shot" unmute when kernel module first loads. ''; }; @@ -21,7 +21,7 @@ in autoMuteAmp = lib.mkOption { type = lib.types.bool; default = true; - description = lib.mdDoc '' + description = '' Unmute the amp when an ALSA device is opened by a client. Mute, with a five-second delay when the ALSA device is closed. (Reopening the device within the five-second close window will cancel mute.) ''; From e6d16f1b6b4a3ab6f717f62965a8c1d23e6a502e Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 8 Aug 2024 20:15:48 +0200 Subject: [PATCH 36/46] surface: linux-surface arch-6.9.9-1 -> arch-6.10.3-1 --- microsoft/surface/common/repos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 8e60ee9..513f788 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "arch-6.9.9-1"; - hash = "sha256-L7o2tqtO5wkTSWaL44SgNeorPdoNjSpM1GDdI7khnSo="; + rev = "arch-6.10.3-1"; + hash = "sha256-T7voXofI5W+YodHB2DtNSKKc4iUlN3NS0onP4TKFvQM="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: From 107bb46eef1f05e86fc485ee8af9b637e5157988 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 8 Aug 2024 20:16:17 +0200 Subject: [PATCH 37/46] surface: linux 6.9.12 -> 6.10.3 --- microsoft/surface/common/default.nix | 2 +- microsoft/surface/common/kernel/default.nix | 2 +- .../common/kernel/{linux-6.9.x => linux-6.10.x}/default.nix | 4 ++-- .../common/kernel/{linux-6.9.x => linux-6.10.x}/patches.nix | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename microsoft/surface/common/kernel/{linux-6.9.x => linux-6.10.x}/default.nix (87%) rename microsoft/surface/common/kernel/{linux-6.9.x => linux-6.10.x}/patches.nix (100%) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index daf9304..f4dbfe9 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -8,7 +8,7 @@ in { ./kernel ]; - microsoft-surface.kernelVersion = mkDefault "6.9"; + microsoft-surface.kernelVersion = mkDefault "6.10"; # Seems to be required to properly enable S0ix "Modern Standby": boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ]; diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index a8f598d..84edc89 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -5,7 +5,7 @@ let in { imports = [ - ./linux-6.9.x + ./linux-6.10.x ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.9.x/default.nix b/microsoft/surface/common/kernel/linux-6.10.x/default.nix similarity index 87% rename from microsoft/surface/common/kernel/linux-6.9.x/default.nix rename to microsoft/surface/common/kernel/linux-6.10.x/default.nix index 4006025..5d6f7a6 100644 --- a/microsoft/surface/common/kernel/linux-6.9.x/default.nix +++ b/microsoft/surface/common/kernel/linux-6.10.x/default.nix @@ -7,14 +7,14 @@ let cfg = config.microsoft-surface; - version = "6.9.12"; + version = "6.10.3"; kernelPatches = surfacePatches { inherit version; patchFn = ./patches.nix; }; kernelPackages = linuxPackage { inherit version kernelPatches; - sha256 = "08ngskni7d9wi93vlwcmbdg7sb2jl1drhhzn62k9nsrg1r7crrss"; + sha256 = "1666dypfg193l5460maadki4hc291hr7k9fw74nq21fxczyj4pzs"; ignoreConfigErrors=true; }; diff --git a/microsoft/surface/common/kernel/linux-6.9.x/patches.nix b/microsoft/surface/common/kernel/linux-6.10.x/patches.nix similarity index 100% rename from microsoft/surface/common/kernel/linux-6.9.x/patches.nix rename to microsoft/surface/common/kernel/linux-6.10.x/patches.nix From f568ffb601d39e3aedae86b056b4cb8e9cb590a8 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Fri, 2 Aug 2024 15:56:38 +0800 Subject: [PATCH 38/46] apple/t2: bump kernel to 6.10.3 --- apple/t2/pkgs/linux-t2.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apple/t2/pkgs/linux-t2.nix b/apple/t2/pkgs/linux-t2.nix index 2691890..585c145 100644 --- a/apple/t2/pkgs/linux-t2.nix +++ b/apple/t2/pkgs/linux-t2.nix @@ -2,19 +2,19 @@ , ... } @ args: let - version = "6.9.8"; + version = "6.10.3"; majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0); patchRepo = fetchFromGitHub { owner = "t2linux"; repo = "linux-t2-patches"; - rev = "47b4069221c0ee3b6db56ab1ea90ae89e2de26f3"; - hash = "sha256-1B5DbLdyKdswy2ERmWVyjojdazTDbMsS+Vz/mrTdoFY="; + rev = "29d6f013088303623cd9f2c6f5951eb3455830a6"; + hash = "sha256-V0dakKRPC6Hj1I+SCiZXOCwtS0mZCCAsWnGtJnFlzxU="; }; kernel = fetchzip { url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz"; - hash = "sha256-o67tasZu4qGQ7obw+BCgNfaLqDcT3SPqsa3kTzWjmfg="; + hash = "sha256-+tWXv9j5bUJN7kzFZxuL+wB1fBCyXbtyms3Q5/dTtK4="; }; in buildLinux (args // { From 6ed5521636c7b40b800a014f26f0eaaa210c2e30 Mon Sep 17 00:00:00 2001 From: kurogeek Date: Mon, 5 Aug 2024 15:11:30 +0700 Subject: [PATCH 39/46] thinkpad-t14-gen1: add a kernel param for touchpad to work properly --- lenovo/thinkpad/t14/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lenovo/thinkpad/t14/default.nix b/lenovo/thinkpad/t14/default.nix index 3466e95..b6fd228 100644 --- a/lenovo/thinkpad/t14/default.nix +++ b/lenovo/thinkpad/t14/default.nix @@ -14,7 +14,11 @@ # Force use of the thinkpad_acpi driver for backlight control. # This allows the backlight save/load systemd service to work. - boot.kernelParams = [ "acpi_backlight=native" ]; + boot.kernelParams = [ + "acpi_backlight=native" + # Needed for touchpad to work properly (click doesn't register by pushing down the touchpad). + "psmouse.synaptics_intertouch=0" + ]; # see https://github.com/NixOS/nixpkgs/issues/69289 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; From 72b83c838d756b6d019017cfafd645b314f85097 Mon Sep 17 00:00:00 2001 From: Andy3153 Date: Wed, 31 Jul 2024 20:12:38 +0300 Subject: [PATCH 40/46] asus-fx506hm: use nvidia-open by default Uses Nvidia open source kernel modules if driver version is higher than 555 Motivation: 1. Nvidia themselves will be using the open source kernel modules by default for drivers above version 555 and for boards that support it (like the one in this laptop) 2. this fixes kernel panics I've been having for months --- asus/fx506hm/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asus/fx506hm/default.nix b/asus/fx506hm/default.nix index 115882b..a50ffdf 100644 --- a/asus/fx506hm/default.nix +++ b/asus/fx506hm/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ config, lib, ... }: { imports = @@ -14,6 +14,7 @@ hardware.nvidia = { modesetting.enable = lib.mkDefault true; + open = lib.mkIf (lib.versionAtLeast config.hardware.nvidia.package.version "555") true; prime = { From dfe45103b691b66a9f5b22cbec99d32ee31e0a52 Mon Sep 17 00:00:00 2001 From: Andre Date: Tue, 30 Jul 2024 20:08:35 -0400 Subject: [PATCH 41/46] lenovo/legion/16arha7: fix kernel check for speaker patch --- lenovo/legion/16arha7/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lenovo/legion/16arha7/default.nix b/lenovo/legion/16arha7/default.nix index 36b10ee..8c258d5 100644 --- a/lenovo/legion/16arha7/default.nix +++ b/lenovo/legion/16arha7/default.nix @@ -14,8 +14,8 @@ in ../../../common/pc/laptop/ssd ]; - # Kernel 6.9 includes the speaker fix, so only install this on systems with older kernels. - boot.extraModulePackages = lib.mkIf (!(lib.versionOlder config.boot.kernelPackages.kernel.version "6.9")) [ lenovo-speaker-fix ]; + # Kernel 6.10 includes the speaker fix, so only install this on systems with older kernels. + boot.extraModulePackages = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.10") [ lenovo-speaker-fix ]; # √(2560² + 1600²) px / 16 in ≃ 189 dpi services.xserver.dpi = 189; From ddebede97439b73e1ba746c0ce68b999bcbb49c0 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 30 Jul 2024 16:54:07 +1200 Subject: [PATCH 42/46] On ASUS Zephyrus GA402X, make enabling auto-suspend on the keyboard optional - On kernels before 6.9.x, default to disabling auto-suspend - On more-recent kernels, default to enabling auto-suspend --- asus/zephyrus/ga402x/shared.nix | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 5049d6e..d4ca3fa 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -5,7 +5,11 @@ }: let - inherit (lib) mkDefault mkIf mkMerge version versionOlder; + inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder; + + cfg = config.hardware.asus.zephyrus.ga402x; + defaultAutosuspendEnable = if (versionAtLeast version "6.9") then true else false; + in { imports = [ @@ -18,6 +22,16 @@ in { ../../../common/pc/ssd ]; + options.hardware.asus.zephyrus.ga402x = { + # Kernels earlier than 6.9 (possibly even earlier) tend to take 1-2 key-presses + # to wake-up the internal keyboard after suspending (the ASUS N-KEY USB Device). + # + # Therefore, this option disables suspend for the keyboard by default, but + # enables it for kernel 6.9.x onwards. + keyboard.autosuspend.enable = (mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" + ) // { default = defaultAutosuspendEnable; }; + }; + config = mkMerge [ { # Configure basic system settings: @@ -43,15 +57,20 @@ in { evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* KEYBOARD_KEY_ff31007c=f20 ''; - extraRules = '' - # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard - # Otherwise, it will tend to take 1-2 key-presses to wake-up after suspending - ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" - ''; }; }; } + (mkIf (! cfg.keyboard.autosuspend.enable) { + services.udev = { + extraRules = '' + # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard + # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after suspending + ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" + ''; + }; + }) + (mkIf (versionOlder version "23.11") { # See https://asus-linux.org/wiki/nixos/ for info about some problems # detecting the dGPU: From d1966ef874040b83d654ab9c896430f3017a9ec1 Mon Sep 17 00:00:00 2001 From: mexisme Date: Tue, 30 Jul 2024 18:34:02 +1200 Subject: [PATCH 43/46] Clarify doc-comments --- asus/zephyrus/ga402x/shared.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index d4ca3fa..2d543ff 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -24,10 +24,11 @@ in { options.hardware.asus.zephyrus.ga402x = { # Kernels earlier than 6.9 (possibly even earlier) tend to take 1-2 key-presses - # to wake-up the internal keyboard after suspending (the ASUS N-KEY USB Device). - # - # Therefore, this option disables suspend for the keyboard by default, but + # to wake-up the internal keyboard after the device is suspended. + # Therefore, this option disables auto-suspend for the keyboard by default, but # enables it for kernel 6.9.x onwards. + # + # Note: the device name is "ASUS N-KEY Device". keyboard.autosuspend.enable = (mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" ) // { default = defaultAutosuspendEnable; }; }; @@ -65,7 +66,7 @@ in { services.udev = { extraRules = '' # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard - # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after suspending + # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" ''; }; From 6f38f8576c0dd1cc76f158e56793323f9c7df773 Mon Sep 17 00:00:00 2001 From: mexisme Date: Fri, 9 Aug 2024 23:03:22 +1200 Subject: [PATCH 44/46] Test the kernel version, rather than the NixOS release version Co-authored-by: Peder Bergebakken Sundt --- asus/zephyrus/ga402x/shared.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 2d543ff..78f5d58 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -8,7 +8,7 @@ let inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder; cfg = config.hardware.asus.zephyrus.ga402x; - defaultAutosuspendEnable = if (versionAtLeast version "6.9") then true else false; + defaultAutosuspendEnable = versionAtLeast config.boot.kernelPackages.kernel.version "6.9"; in { From 569b23fd8271ec562652295bf67e7378cca6570e Mon Sep 17 00:00:00 2001 From: mexisme Date: Fri, 9 Aug 2024 23:59:14 +1200 Subject: [PATCH 45/46] Simplify the diff, by moving the (mkIf ...) for the keyboard.autosuspend.enable option to within the associated services.udev.extraRules attr-set --- asus/zephyrus/ga402x/shared.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index 78f5d58..a45c241 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -29,7 +29,8 @@ in { # enables it for kernel 6.9.x onwards. # # Note: the device name is "ASUS N-KEY Device". - keyboard.autosuspend.enable = (mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" + keyboard.autosuspend.enable = ( + mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X" ) // { default = defaultAutosuspendEnable; }; }; @@ -58,19 +59,14 @@ in { evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* KEYBOARD_KEY_ff31007c=f20 ''; - }; - }; - } - - (mkIf (! cfg.keyboard.autosuspend.enable) { - services.udev = { - extraRules = '' + extraRules = mkIf (! cfg.keyboard.autosuspend.enable) '' # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" ''; + }; }; - }) + } (mkIf (versionOlder version "23.11") { # See https://asus-linux.org/wiki/nixos/ for info about some problems From c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf Mon Sep 17 00:00:00 2001 From: mexisme Date: Sat, 10 Aug 2024 00:08:54 +1200 Subject: [PATCH 46/46] Tidy-up idents --- asus/zephyrus/ga402x/shared.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/asus/zephyrus/ga402x/shared.nix b/asus/zephyrus/ga402x/shared.nix index a45c241..91739ba 100644 --- a/asus/zephyrus/ga402x/shared.nix +++ b/asus/zephyrus/ga402x/shared.nix @@ -59,11 +59,11 @@ in { evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:* KEYBOARD_KEY_ff31007c=f20 ''; - extraRules = mkIf (! cfg.keyboard.autosuspend.enable) '' - # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard - # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends - ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" - ''; + extraRules = mkIf (! cfg.keyboard.autosuspend.enable) '' + # Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard + # Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends + ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1" + ''; }; }; }