Compare commits

...

53 commits

Author SHA1 Message Date
Aires 148d32df92 Merge remote-tracking branch 'upstream/master'
Some checks failed
Test / tests (nixos-24.05) (push) Has been cancelled
Test / tests (nixos-unstable) (push) Has been cancelled
2024-08-17 12:50:54 -04:00
mexisme c54cf53e02 Tidy-up idents 2024-08-10 17:15:28 +00:00
mexisme 569b23fd82 Simplify the diff, by moving the (mkIf ...) for the keyboard.autosuspend.enable option to within the associated services.udev.extraRules attr-set 2024-08-10 17:15:28 +00:00
mexisme 6f38f8576c Test the kernel version, rather than the NixOS release version
Co-authored-by: Peder Bergebakken Sundt <pbsds@hotmail.com>
2024-08-10 17:15:28 +00:00
mexisme d1966ef874 Clarify doc-comments 2024-08-10 17:15:28 +00:00
mexisme ddebede974 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
2024-08-10 17:15:28 +00:00
Aires dfe45103b6 lenovo/legion/16arha7: fix kernel check for speaker patch 2024-08-10 17:03:31 +00:00
Andy3153 72b83c838d 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
2024-08-10 16:52:19 +00:00
kurogeek 6ed5521636 thinkpad-t14-gen1: add a kernel param for touchpad to work properly 2024-08-10 16:40:58 +00:00
Cassie Cheung f568ffb601 apple/t2: bump kernel to 6.10.3 2024-08-10 16:29:06 +00:00
Stig Palmquist 107bb46eef surface: linux 6.9.12 -> 6.10.3 2024-08-08 20:44:18 +00:00
Stig Palmquist e6d16f1b6b surface: linux-surface arch-6.9.9-1 -> arch-6.10.3-1 2024-08-08 20:44:18 +00:00
Ali Rizvi 14c333162b treewide: remove uses of lib.mdDoc 2024-07-30 09:47:52 +00:00
Stig Palmquist eab049fe17 surface: linux 6.9.9 -> 6.9.12 2024-07-29 18:38:25 +00:00
Jörg Thalheim e67b60fb1b
Merge pull request #1060 from ericthomasca/master
fix link text for Omen 14-fb0798ng
2024-07-27 23:15:37 +02:00
Eric Thomas b7b55739f7
fix link text for Omen 14-fb0798ng 2024-07-26 20:53:48 -02:30
Tracteur Blindé 0b4d40f95a surface: linux 6.9.3 -> 6.9.9 2024-07-26 18:19:19 +00:00
Tracteur Blindé 1091743811 surface: linux-surface arch-6.9.3-1 to arch-6.9.9-1 2024-07-26 18:19:19 +00:00
Guanran Wang d3c993c851 Lenovo ThinkPad X1 (12th Gen): init 2024-07-25 12:45:38 +00:00
mexisme 60d3bae384 Add deprecation explanation 2024-07-25 12:33:47 +00:00
mexisme 13d6cbde4d 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
2024-07-25 12:33:47 +00:00
mexisme 5bd0371d3f 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
2024-07-25 09:35:27 +00:00
Jörg Thalheim 0550809b07
Merge pull request #1020 from paepckehh/master
apple-macbookpro-14-1: update, apple-imac-18-2: add
2024-07-25 11:23:10 +02:00
Majiir Paktu 226e517854 surface: fix default kernel version 2024-07-25 09:22:23 +00:00
Majiir Paktu 39ac67a5fe surface: fix isVersionOf check 2024-07-25 09:22:23 +00:00
Tobias Mayer a7432ebaef 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.
2024-07-24 16:48:33 +00:00
Arne Cuperus b501c5fbf6 Add configuration for Lenovo IdeaPad Gaming 3 15ach6 2024-07-24 16:36:32 +00:00
mexisme 405b654893 Add Lenovo Thinkpad T14 Gen5
- Which is basically the same as Gen4 ...
2024-07-23 17:03:44 +00:00
mergify[bot] 217b5812a2
Merge branch 'master' into master 2024-07-19 18:22:04 +00:00
Lyndon Sanche ab165a8a6c 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
2024-07-19 18:22:01 +00:00
Jörg Thalheim 05672b50f7 dell/xps/15-9560: fix graphics options 2024-07-19 18:10:23 +00:00
Jörg Thalheim 6a4ecebce5 dell/xps/15-9560: use graphics option 2024-07-19 18:10:23 +00:00
liamwb 42577dbb0f removed parts that are included in other modules 2024-07-19 18:10:23 +00:00
liamwb 19e9c2fb7a naively pasted code from our forum discussion 2024-07-19 18:10:23 +00:00
Nico Elbers ece5b12014 update README for omen 16-n0280nd 2024-07-19 17:58:34 +00:00
Nico Elbers 89a33c8e93 omen 16-n0280nd: init 2024-07-19 17:58:34 +00:00
Jörg Thalheim a70fa1ac5b
Merge branch 'master' into master 2024-07-19 19:50:48 +02:00
superherointj 71b92eab15 asus-rog-strix-x570: init
Spec: https://rog.asus.com/motherboards/rog-strix/rog-strix-x570-e-gaming-model/spec/
2024-07-19 16:05:41 +00:00
Dom Rodriguez d8bfbbf614 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 <shymega@shymega.org.uk>
2024-07-19 15:41:46 +00:00
Niklas Gollenstede 3501b9c096 flake.nix: export paths instead of imported files 2024-07-19 15:29:10 +00:00
❄️ bb90787ea0
Merge pull request #1041 from jjtt/x260
Remove BTRFS related setting for ThinkPad x260
2024-07-18 16:45:12 -03:00
jjtt 108f27f71e 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
2024-07-18 21:58:17 +03:00
❄️ ede1f14cc2
Merge pull request #1037 from Sigmanificient/master
asus-rog-strix-g713ie: init
2024-07-18 14:20:32 -03:00
Sigmanificient 9a816e3d1c asus-rog-strix-g713ie: init
update README for asus rog-strix g713ie
2024-07-18 19:06:24 +02:00
toastal 9a187879f4
lenovo-thinkpad-z13-gen2: move to asound.conf
`sound.*` was removed upstream in Nixpkgs
2024-07-18 14:03:33 -03:00
Michael Paepcke 37d3f20674
Update README.md
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2024-07-15 19:35:43 +00:00
Michael Paepcke ea9f6719b1
Update README.md
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2024-07-15 19:35:33 +00:00
Michael Paepcke 6187754bdd
Update README.md
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2024-07-15 19:35:23 +00:00
Michael Paepcke c6b440dcd6
apple/macbook-pro/14-1/README.md: use markdown checkboxes 2024-06-30 08:14:43 +00:00
Jörg Thalheim d403b7f6ae
apple/imac/18-2/README.md: use markdown checkboxes 2024-06-30 09:29:16 +02:00
Paepcke, Michael d33e3e7147
apple-imac-18-2: add flake support 2024-06-28 22:49:56 +02:00
Paepcke, Michael 40e296b2b3
apple-imac-18-2: add imac, add imac-18-2 2024-06-28 22:38:31 +02:00
Paepcke, Michael d3ef6d0c7c
apple-macbookpro-14-1: update info, simplify and fix config 2024-06-28 20:05:46 +02:00
44 changed files with 344 additions and 173 deletions

View file

@ -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

View file

@ -89,7 +89,9 @@ See code for all available configurations.
| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `<nixos-hardware/asus/pro-ws-x570-ace>` |
| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `<nixos-hardware/asus/ally/rc71l>` |
| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `<nixos-hardware/asus/rog-strix/g513im>` |
| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `<nixos-hardware/asus/rog-strix/g713ie>` |
| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `<nixos-hardware/asus/rog-strix/g733qs>` |
| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `<nixos-hardware/asus/rog-strix/x570e>` |
| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `<nixos-hardware/asus/zephyrus/ga401>` |
| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `<nixos-hardware/asus/zephyrus/ga402>` |
| [Asus ROG Zephyrus G14 GA402X* (2023)](asus/zephyrus/ga402x/amdgpu) | `<nixos-hardware/asus/zephyrus/ga402x/amdgpu>` |
@ -178,6 +180,7 @@ See code for all available configurations.
| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `<nixos-hardware/intel/nuc/8i7beh>` |
| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `<nixos-hardware/lenovo/ideapad/15alc6>` |
| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `<nixos-hardware/lenovo/ideapad/15arh05>` |
| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `<nixos-hardware/lenovo/ideapad/15ach6>` |
| [Lenovo IdeaPad 5 Pro 16ach6](lenovo/ideapad/16ach6) | `<nixos-hardware/lenovo/ideapad/16ach6>` |
| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `<nixos-hardware/lenovo/ideapad/z510>` |
| [Lenovo IdeaPad Slim 5](lenovo/ideapad/slim-5) | `<nixos-hardware/lenovo/ideapad/slim-5>` |
@ -248,6 +251,7 @@ See code for all available configurations.
| [Lenovo ThinkPad X1 (9th Gen)](lenovo/thinkpad/x1/9th-gen) | `<nixos-hardware/lenovo/thinkpad/x1/9th-gen>` |
| [Lenovo ThinkPad X1 (10th Gen)](lenovo/thinkpad/x1/10th-gen) | `<nixos-hardware/lenovo/thinkpad/x1/10th-gen>` |
| [Lenovo ThinkPad X1 (11th Gen)](lenovo/thinkpad/x1/11th-gen) | `<nixos-hardware/lenovo/thinkpad/x1/11th-gen>` |
| [Lenovo ThinkPad X1 (12th Gen)](lenovo/thinkpad/x1/12th-gen) | `<nixos-hardware/lenovo/thinkpad/x1/12th-gen>` |
| [Lenovo ThinkPad X1 Extreme Gen 2](lenovo/thinkpad/x1-extreme/gen2) | `<nixos-hardware/lenovo/thinkpad/x1-extreme/gen2>` |
| [Lenovo ThinkPad X1 Extreme Gen 4](lenovo/thinkpad/x1-extreme/gen4) | `<nixos-hardware/lenovo/thinkpad/x1-extreme/gen4>` |
| [Lenovo ThinkPad X1 Nano Gen 1](lenovo/thinkpad/x1-nano/gen1) | `<nixos-hardware/lenovo/thinkpad/x1-nano/gen1>` |
@ -287,9 +291,10 @@ See code for all available configurations.
| [NXP iMX8 MQuad Evaluation Kit](nxp/imx8mq-evk) | `<nixos-hardware/nxp/imx8mq-evk>` |
| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `<nixos-hardware/hardkernel/odroid-hc4>` |
| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `<nixos-hardware/hardkernel/odroid-h3>` |
| [Omen 15-en0010ca](omen/14-fb0798ng) | `<nixos-hardware/omen/14-fb0798ng>` |
| [Omen 14-fb0798ng](omen/14-fb0798ng) | `<nixos-hardware/omen/14-fb0798ng>` |
| [Omen 15-en0010ca](omen/15-en0010ca) | `<nixos-hardware/omen/15-en0010ca>` |
| [Omen 16-n0005ne](omen/16-n0005ne) | `<nixos-hardware/omen/16-n0005ne>` |
| [Omen 16-n0280nd](/omen/16-n0280nd) | `<nixos-hardware/omen/16-n0280nd>` |
| [Omen 15-en1007sa](omen/15-en1007sa) | `<nixos-hardware/omen/15-en1007sa>` |
| [Omen 15-en0002np](omen/15-en0002np) | `<nixos-hardware/omen/15-en0002np>` |
| [One-Netbook OneNetbook 4](onenetbook/4) | `<nixos-hardware/onenetbook/4>` |

26
apple/imac/18-2/README.md Normal file
View file

@ -0,0 +1,26 @@
# iMac 18,2, NixOS 24.05 (2024)
## Audio
- [ ] broken until https://github.com/NixOS/nixpkgs/pull/322968 lands in master
## Bluetooth
- [ ] broken until https://github.com/NixOS/nixpkgs/pull/322964 lands in master
## 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

View file

@ -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;
};
}

8
apple/imac/default.nix Normal file
View file

@ -0,0 +1,8 @@
{
imports = [
../.
../../common/cpu/intel
../../common/pc/laptop
../../common/pc/laptop/ssd
];
}

View file

@ -1,25 +1,25 @@
# 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 until https://github.com/NixOS/nixpkgs/pull/322968 lands in master
## Bluetooth
[ ] Still broken, even (hacky) workaround does not work any more with latest driver updates
- [ ] broken lands https://github.com/NixOS/nixpkgs/pull/322964 in master
## 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 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

View file

@ -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

View file

@ -5,10 +5,10 @@
...
}: {
imports = [
../.
../../../common/gpu/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" ];

View file

@ -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 // {

View file

@ -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 =
{

View file

@ -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";
};
}

View file

@ -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" ];
}

View file

@ -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)

View file

@ -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! See https://github.com/NixOS/nixos-hardware/blob/master/asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md for more details";
}
];
}

View file

@ -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 = versionAtLeast config.boot.kernelPackages.kernel.version "6.9";
in {
imports = [
@ -18,6 +22,18 @@ 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 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; };
};
config = mkMerge [
{
# Configure basic system settings:
@ -43,9 +59,9 @@ in {
evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
KEYBOARD_KEY_ff31007c=f20
'';
extraRules = ''
extraRules = mkIf (! cfg.keyboard.autosuspend.enable) ''
# 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
# 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"
'';
};

View file

@ -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" ])
];
}

View file

@ -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;
};

View file

@ -4,36 +4,18 @@
../../../common/gpu/intel/kaby-lake
../../../common/pc/laptop
./xps-common.nix
# FIXME: remove this when bumblebee works again
../../../common/gpu/nvidia/disable.nix
../../../common/gpu/nvidia
];
hardware.graphics.enable = true;
/* Bumblebee seems to fail to evaluate:
(stack trace truncated; use '--show-trace' to show the full trace)
hardware.nvidia.modesetting.enable = true;
error: assertion '(useSettings -> (! libsOnly))' failed
hardware.nvidia.prime = {
# integrated
intelBusId = "PCI:0:2:0";
at /home/joerg/git/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix:61:1:
60|
61| assert useSettings -> !libsOnly;
| ^
62| assert !libsOnly -> kernel != null;
# 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
##### bumblebee working, needs reboot to take affect and to use it run: optirun "<application>"
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";
*/
# dedicated
nvidiaBusId = "PCI:1:0:0";
};
}

View file

@ -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;
@ -16,6 +17,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;
@ -25,11 +27,15 @@
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-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;
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;
@ -109,6 +115,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;
@ -154,6 +161,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;
@ -183,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;
@ -206,6 +215,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;
@ -229,6 +240,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;

View file

@ -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
'';
}

View file

@ -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");
};

View file

@ -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.
'';
};

View file

@ -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;
};

View file

@ -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)
```

View file

@ -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";
};
};
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;

View file

@ -0,0 +1,8 @@
{
imports = [
../.
../../../../common/pc/laptop/ssd
];
hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint";
}

View file

@ -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";
};
}

View file

@ -0,0 +1,9 @@
pcm.!default {
type plug
slave.pcm "hw:1,0"
}
ctl.!default {
type hw
card 1
}

View file

@ -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;
}

View file

@ -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)

View file

@ -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";
}
];
}

View file

@ -8,7 +8,7 @@ in {
./kernel
];
microsoft-surface.kernelVersion = mkDefault "6.6";
microsoft-surface.kernelVersion = mkDefault "6.10";
# Seems to be required to properly enable S0ix "Modern Standby":
boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ];

View file

@ -5,7 +5,7 @@ let
in {
imports = [
./linux-6.9.x
./linux-6.10.x
];
options.microsoft-surface.kernelVersion = mkOption {

View file

@ -7,14 +7,14 @@ let
cfg = config.microsoft-surface;
version = "6.9.3";
version = "6.10.3";
kernelPatches = surfacePatches {
inherit version;
patchFn = ./patches.nix;
};
kernelPackages = linuxPackage {
inherit version kernelPatches;
sha256 = "1bnzxparybwh320019pr2msaapas41dhjmvg4gy791rn05jc88f3";
sha256 = "1666dypfg193l5460maadki4hc291hr7k9fw74nq21fxczyj4pzs";
ignoreConfigErrors=true;
};

View file

@ -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;

View file

@ -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.10.3-1";
hash = "sha256-T7voXofI5W+YodHB2DtNSKKc4iUlN3NS0onP4TKFvQM=";
};
# This is the owner and repo for the pre-patched kernel from the "linux-surface" project:

View file

@ -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`.

View file

@ -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";
};
}

View file

@ -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.

View file

@ -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.)
'';