Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
148d32df92
|
@ -1,6 +1,7 @@
|
||||||
beagleboard/pocketbeagle @yegortimoshenko
|
beagleboard/pocketbeagle @yegortimoshenko
|
||||||
dell/xps/13-9370 @moredread
|
dell/xps/13-9370 @moredread
|
||||||
dell/xps/13-9380 @kalbasit
|
dell/xps/13-9380 @kalbasit
|
||||||
|
dell/xps/15-9560 @Lyndeno
|
||||||
lenovo/thinkpad/x230 @makefu @yegortimoshenko
|
lenovo/thinkpad/x230 @makefu @yegortimoshenko
|
||||||
lenovo/thinkpad/x250 @Mic92
|
lenovo/thinkpad/x250 @Mic92
|
||||||
pcengines/apu @yegortimoshenko
|
pcengines/apu @yegortimoshenko
|
||||||
|
|
|
@ -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 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 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 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 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 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 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>` |
|
| [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>` |
|
| [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 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 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 5 Pro 16ach6](lenovo/ideapad/16ach6) | `<nixos-hardware/lenovo/ideapad/16ach6>` |
|
||||||
| [Lenovo IdeaPad Z510](lenovo/ideapad/z510) | `<nixos-hardware/lenovo/ideapad/z510>` |
|
| [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>` |
|
| [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 (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 (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 (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 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 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>` |
|
| [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>` |
|
| [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 HC4](hardkernel/odroid-hc4/default.nix) | `<nixos-hardware/hardkernel/odroid-hc4>` |
|
||||||
| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `<nixos-hardware/hardkernel/odroid-h3>` |
|
| [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 15-en0010ca](omen/15-en0010ca) | `<nixos-hardware/omen/15-en0010ca>` |
|
||||||
| [Omen 16-n0005ne](omen/16-n0005ne) | `<nixos-hardware/omen/16-n0005ne>` |
|
| [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-en1007sa](omen/15-en1007sa) | `<nixos-hardware/omen/15-en1007sa>` |
|
||||||
| [Omen 15-en0002np](omen/15-en0002np) | `<nixos-hardware/omen/15-en0002np>` |
|
| [Omen 15-en0002np](omen/15-en0002np) | `<nixos-hardware/omen/15-en0002np>` |
|
||||||
| [One-Netbook OneNetbook 4](onenetbook/4) | `<nixos-hardware/onenetbook/4>` |
|
| [One-Netbook OneNetbook 4](onenetbook/4) | `<nixos-hardware/onenetbook/4>` |
|
||||||
|
|
26
apple/imac/18-2/README.md
Normal file
26
apple/imac/18-2/README.md
Normal 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
|
30
apple/imac/18-2/default.nix
Normal file
30
apple/imac/18-2/default.nix
Normal 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
8
apple/imac/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../.
|
||||||
|
../../common/cpu/intel
|
||||||
|
../../common/pc/laptop
|
||||||
|
../../common/pc/laptop/ssd
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,25 +1,25 @@
|
||||||
# MacBook Pro 14,1, NixOS 24.01 (2024)
|
# MacBook Pro 14,1, NixOS 24.05 (2024)
|
||||||
|
|
||||||
## Audio
|
## 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
|
## 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
|
## Touchpad
|
||||||
[x] Working, including 'disable while typing' usable quirk
|
- [x] Working, including 'disable while typing' usable quirk
|
||||||
|
|
||||||
## Thunderbolt
|
## Thunderbolt
|
||||||
[x] Working
|
- [x] Working
|
||||||
|
|
||||||
## NVME
|
## NVME
|
||||||
[x] Working, older NVME / Controller may need workaround for resume
|
- [x] Working, older NVME / Controller may need workaround for resume
|
||||||
|
|
||||||
## Suspend/Resume
|
## Suspend/Resume
|
||||||
[ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes).
|
- [ ] Thunderbolt, WIFI, NVME may still need reboot (sometimes).
|
||||||
|
|
||||||
## Wifi
|
## 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
|
## Resources
|
||||||
- https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-file
|
- https://github.com/Dunedan/mbp-2016-linux?tab=readme-ov-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
|
|
|
@ -5,10 +5,10 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
../.
|
||||||
../../../common/gpu/intel/kaby-lake
|
../../../common/gpu/intel/kaby-lake
|
||||||
../../../common/gpu/intel
|
../../../common/gpu/intel
|
||||||
../../../common/hidpi.nix
|
../../../common/hidpi.nix
|
||||||
../../../common/pc/laptop
|
|
||||||
../../../common/pc/laptop/ssd
|
../../../common/pc/laptop/ssd
|
||||||
../../../common/pc/laptop/acpi_call.nix
|
../../../common/pc/laptop/acpi_call.nix
|
||||||
];
|
];
|
||||||
|
@ -49,34 +49,10 @@
|
||||||
cpu.intel.updateMicrocode = lib.mkDefault true;
|
cpu.intel.updateMicrocode = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bluetooth, only needed if kernel lacks support - custom kernel build
|
# [Enable only if needed!]
|
||||||
# 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!]
|
|
||||||
# Disable d3cold on older NVME controller, only if needed
|
# Disable d3cold on older NVME controller, only if needed
|
||||||
# https://github.com/Dunedan/mbp-2016-linux
|
# https://github.com/Dunedan/mbp-2016-linux
|
||||||
##
|
#
|
||||||
#systemd.services.disable-nvme-d3cold = {
|
#systemd.services.disable-nvme-d3cold = {
|
||||||
# description = "Disables d3cold on the NVME controller";
|
# description = "Disables d3cold on the NVME controller";
|
||||||
# before = [ "suspend.target" ];
|
# before = [ "suspend.target" ];
|
||||||
|
|
|
@ -2,19 +2,19 @@
|
||||||
, ... } @ args:
|
, ... } @ args:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "6.9.8";
|
version = "6.10.3";
|
||||||
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
|
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
|
||||||
|
|
||||||
patchRepo = fetchFromGitHub {
|
patchRepo = fetchFromGitHub {
|
||||||
owner = "t2linux";
|
owner = "t2linux";
|
||||||
repo = "linux-t2-patches";
|
repo = "linux-t2-patches";
|
||||||
rev = "47b4069221c0ee3b6db56ab1ea90ae89e2de26f3";
|
rev = "29d6f013088303623cd9f2c6f5951eb3455830a6";
|
||||||
hash = "sha256-1B5DbLdyKdswy2ERmWVyjojdazTDbMsS+Vz/mrTdoFY=";
|
hash = "sha256-V0dakKRPC6Hj1I+SCiZXOCwtS0mZCCAsWnGtJnFlzxU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
kernel = fetchzip {
|
kernel = fetchzip {
|
||||||
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
|
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
|
||||||
hash = "sha256-o67tasZu4qGQ7obw+BCgNfaLqDcT3SPqsa3kTzWjmfg=";
|
hash = "sha256-+tWXv9j5bUJN7kzFZxuL+wB1fBCyXbtyms3Q5/dTtK4=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
buildLinux (args // {
|
buildLinux (args // {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
hardware.nvidia =
|
hardware.nvidia =
|
||||||
{
|
{
|
||||||
modesetting.enable = lib.mkDefault true;
|
modesetting.enable = lib.mkDefault true;
|
||||||
|
open = lib.mkIf (lib.versionAtLeast config.hardware.nvidia.package.version "555") true;
|
||||||
|
|
||||||
prime =
|
prime =
|
||||||
{
|
{
|
||||||
|
|
16
asus/rog-strix/g713ie/default.nix
Normal file
16
asus/rog-strix/g713ie/default.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
14
asus/rog-strix/x570e/default.nix
Normal file
14
asus/rog-strix/x570e/default.nix
Normal 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" ];
|
||||||
|
}
|
16
asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md
Normal file
16
asus/zephyrus/ga402x/ATTR-SET-DEPRECATION.md
Normal 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)
|
|
@ -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;
|
assertions = [
|
||||||
nvidia = import ./nvidia;
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,11 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
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 {
|
in {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -18,6 +22,18 @@ in {
|
||||||
../../../common/pc/ssd
|
../../../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 [
|
config = mkMerge [
|
||||||
{
|
{
|
||||||
# Configure basic system settings:
|
# Configure basic system settings:
|
||||||
|
@ -43,9 +59,9 @@ in {
|
||||||
evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
|
evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
|
||||||
KEYBOARD_KEY_ff31007c=f20
|
KEYBOARD_KEY_ff31007c=f20
|
||||||
'';
|
'';
|
||||||
extraRules = ''
|
extraRules = mkIf (! cfg.keyboard.autosuspend.enable) ''
|
||||||
# Disable auto-suspend for the ASUS N-KEY Device, i.e. USB Keyboard
|
# 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"
|
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,5 +9,7 @@
|
||||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ])
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ])
|
||||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ])
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ])
|
||||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ])
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ])
|
||||||
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "package" ] [ "hardware" "opengl" "package" ])
|
||||||
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "package32" ] [ "hardware" "opengl" "package32" ])
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
options.hardware.intelgpu.loadInInitrd =
|
options.hardware.intelgpu.loadInInitrd =
|
||||||
lib.mkEnableOption (
|
lib.mkEnableOption
|
||||||
lib.mdDoc "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)"
|
"Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)"
|
||||||
)
|
|
||||||
// {
|
// {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,36 +4,18 @@
|
||||||
../../../common/gpu/intel/kaby-lake
|
../../../common/gpu/intel/kaby-lake
|
||||||
../../../common/pc/laptop
|
../../../common/pc/laptop
|
||||||
./xps-common.nix
|
./xps-common.nix
|
||||||
|
../../../common/gpu/nvidia
|
||||||
# FIXME: remove this when bumblebee works again
|
|
||||||
../../../common/gpu/nvidia/disable.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
|
||||||
/* Bumblebee seems to fail to evaluate:
|
hardware.nvidia.modesetting.enable = true;
|
||||||
(stack trace truncated; use '--show-trace' to show the full trace)
|
|
||||||
|
|
||||||
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:
|
# dedicated
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
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";
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
12
flake.nix
12
flake.nix
|
@ -4,6 +4,7 @@
|
||||||
outputs = _: {
|
outputs = _: {
|
||||||
nixosModules = let
|
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;
|
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 {
|
in {
|
||||||
acer-aspire-4810t = import ./acer/aspire/4810t;
|
acer-aspire-4810t = import ./acer/aspire/4810t;
|
||||||
airis-n990 = import ./airis/n990;
|
airis-n990 = import ./airis/n990;
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1;
|
apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1;
|
||||||
apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1;
|
apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1;
|
||||||
apple-macmini-4-1 = import ./apple/macmini/4;
|
apple-macmini-4-1 = import ./apple/macmini/4;
|
||||||
|
apple-imac-18-2 = import ./apple/imac/18-2;
|
||||||
apple-t2 = import ./apple/t2;
|
apple-t2 = import ./apple/t2;
|
||||||
asus-battery = import ./asus/battery.nix;
|
asus-battery = import ./asus/battery.nix;
|
||||||
asus-ally-rc71l = import ./asus/ally/rc71l;
|
asus-ally-rc71l = import ./asus/ally/rc71l;
|
||||||
|
@ -25,11 +27,15 @@
|
||||||
asus-fa507rm = import ./asus/fa507rm;
|
asus-fa507rm = import ./asus/fa507rm;
|
||||||
asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace;
|
asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace;
|
||||||
asus-rog-strix-g513im = import ./asus/rog-strix/g513im;
|
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-g733qs = import ./asus/rog-strix/g733qs;
|
||||||
|
asus-rog-strix-x570e = import ./asus/rog-strix/x570e;
|
||||||
asus-zenbook-ux371 = import ./asus/zenbook/ux371;
|
asus-zenbook-ux371 = import ./asus/zenbook/ux371;
|
||||||
asus-zephyrus-ga401 = import ./asus/zephyrus/ga401;
|
asus-zephyrus-ga401 = import ./asus/zephyrus/ga401;
|
||||||
asus-zephyrus-ga402 = import ./asus/zephyrus/ga402;
|
asus-zephyrus-ga402 = import ./asus/zephyrus/ga402;
|
||||||
asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x;
|
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-ga502 = import ./asus/zephyrus/ga502;
|
||||||
asus-zephyrus-ga503 = import ./asus/zephyrus/ga503;
|
asus-zephyrus-ga503 = import ./asus/zephyrus/ga503;
|
||||||
asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h;
|
asus-zephyrus-gu603h = import ./asus/zephyrus/gu603h;
|
||||||
|
@ -109,6 +115,7 @@
|
||||||
intel-nuc-8i7beh = import ./intel/nuc/8i7beh;
|
intel-nuc-8i7beh = import ./intel/nuc/8i7beh;
|
||||||
lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6;
|
lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6;
|
||||||
lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05;
|
lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05;
|
||||||
|
lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6;
|
||||||
lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6;
|
lenovo-ideapad-16ach6 = import ./lenovo/ideapad/16ach6;
|
||||||
lenovo-ideapad-z510 = import ./lenovo/ideapad/z510;
|
lenovo-ideapad-z510 = import ./lenovo/ideapad/z510;
|
||||||
lenovo-ideapad-slim-5 = import ./lenovo/ideapad/slim-5;
|
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-gen2 = import ./lenovo/thinkpad/t14/amd/gen2;
|
||||||
lenovo-thinkpad-t14-amd-gen3 = import ./lenovo/thinkpad/t14/amd/gen3;
|
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-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 = import ./lenovo/thinkpad/t14s;
|
||||||
lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1;
|
lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1;
|
||||||
lenovo-thinkpad-t14s-amd-gen4 = import ./lenovo/thinkpad/t14s/amd/gen4;
|
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-9th-gen = import ./lenovo/thinkpad/x1/9th-gen;
|
||||||
lenovo-thinkpad-x1-10th-gen = import ./lenovo/thinkpad/x1/10th-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-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 = import ./lenovo/thinkpad/x1-extreme;
|
||||||
lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2;
|
lenovo-thinkpad-x1-extreme-gen2 = import ./lenovo/thinkpad/x1-extreme/gen2;
|
||||||
lenovo-thinkpad-x1-extreme-gen4 = import ./lenovo/thinkpad/x1-extreme/gen4;
|
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-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13;
|
||||||
lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6;
|
lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6;
|
||||||
lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7;
|
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;
|
lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8;
|
||||||
letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4;
|
letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4;
|
||||||
microchip-icicle-kit = import ./microchip/icicle-kit;
|
microchip-icicle-kit = import ./microchip/icicle-kit;
|
||||||
|
@ -229,6 +240,7 @@
|
||||||
omen-14-fb0798ng = import ./omen/14-fb0798ng;
|
omen-14-fb0798ng = import ./omen/14-fb0798ng;
|
||||||
omen-15-en0010ca = import ./omen/15-en0010ca;
|
omen-15-en0010ca = import ./omen/15-en0010ca;
|
||||||
omen-16-n0005ne = import ./omen/16-n0005ne;
|
omen-16-n0005ne = import ./omen/16-n0005ne;
|
||||||
|
omen-16-n0280nd = import ./omen/16-n0280nd;
|
||||||
omen-15-en1007sa = import ./omen/15-en1007sa;
|
omen-15-en1007sa = import ./omen/15-en1007sa;
|
||||||
omen-15-en0002np = import ./omen/15-en0002np;
|
omen-15-en0002np = import ./omen/15-en0002np;
|
||||||
onenetbook-4 = import ./onenetbook/4;
|
onenetbook-4 = import ./onenetbook/4;
|
||||||
|
|
|
@ -26,4 +26,14 @@
|
||||||
|
|
||||||
# Enable keyboard customization
|
# Enable keyboard customization
|
||||||
hardware.keyboard.qmk.enable = lib.mkDefault true;
|
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
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, lib, ... }:
|
{ 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 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
|
# Enable by default if on new enough version of NixOS
|
||||||
default = (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05");
|
default = (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05");
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@ in
|
||||||
hardware.sensor.iio.bmi260.enable = mkOption {
|
hardware.sensor.iio.bmi260.enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = mdDoc ''
|
description = ''
|
||||||
Enable Bosch BMI260 IMU kernel module driver.
|
Enable Bosch BMI260 IMU kernel module driver.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@ in
|
||||||
# NOTICE: Whenever you can limit PPT to 15W by pressing Fn + Shift to enter quiet mode.
|
# NOTICE: Whenever you can limit PPT to 15W by pressing Fn + Shift to enter quiet mode.
|
||||||
|
|
||||||
options.hardware.gpd.ppt = {
|
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 increase PPT to the BIOS default when power adapter plugin to increase performance.
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
|
25
lenovo/ideapad/15ach6/README.md
Normal file
25
lenovo/ideapad/15ach6/README.md
Normal 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)
|
||||||
|
```
|
20
lenovo/ideapad/15ach6/default.nix
Normal file
20
lenovo/ideapad/15ach6/default.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -14,8 +14,8 @@ in
|
||||||
../../../common/pc/laptop/ssd
|
../../../common/pc/laptop/ssd
|
||||||
];
|
];
|
||||||
|
|
||||||
# Kernel 6.9 includes the speaker fix, so only install this on systems with older kernels.
|
# 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.9") [ lenovo-speaker-fix ];
|
boot.extraModulePackages = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.10") [ lenovo-speaker-fix ];
|
||||||
|
|
||||||
# √(2560² + 1600²) px / 16 in ≃ 189 dpi
|
# √(2560² + 1600²) px / 16 in ≃ 189 dpi
|
||||||
services.xserver.dpi = 189;
|
services.xserver.dpi = 189;
|
||||||
|
|
12
lenovo/thinkpad/t14/amd/gen5/default.nix
Normal file
12
lenovo/thinkpad/t14/amd/gen5/default.nix
Normal 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;
|
||||||
|
}
|
|
@ -14,7 +14,11 @@
|
||||||
|
|
||||||
# Force use of the thinkpad_acpi driver for backlight control.
|
# Force use of the thinkpad_acpi driver for backlight control.
|
||||||
# This allows the backlight save/load systemd service to work.
|
# 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
|
# see https://github.com/NixOS/nixpkgs/issues/69289
|
||||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest;
|
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest;
|
||||||
|
|
8
lenovo/thinkpad/x1/12th-gen/default.nix
Normal file
8
lenovo/thinkpad/x1/12th-gen/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../.
|
||||||
|
../../../../common/pc/laptop/ssd
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint";
|
||||||
|
}
|
|
@ -9,9 +9,4 @@
|
||||||
# https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X260#Thinkpad_X260
|
# https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X260#Thinkpad_X260
|
||||||
"i915.enable_psr=0"
|
"i915.enable_psr=0"
|
||||||
];
|
];
|
||||||
|
|
||||||
# https://wiki.archlinux.org/index.php/TLP#Btrfs
|
|
||||||
services.tlp.settings = {
|
|
||||||
SATA_LINKPWR_ON_BAT = "med_power_with_dipm";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
9
lenovo/thinkpad/z/gen2/z13/asound.conf
Normal file
9
lenovo/thinkpad/z/gen2/z13/asound.conf
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
pcm.!default {
|
||||||
|
type plug
|
||||||
|
slave.pcm "hw:1,0"
|
||||||
|
}
|
||||||
|
|
||||||
|
ctl.!default {
|
||||||
|
type hw
|
||||||
|
card 1
|
||||||
|
}
|
|
@ -5,15 +5,5 @@
|
||||||
../../../../../lenovo/thinkpad/z/gen2
|
../../../../../lenovo/thinkpad/z/gen2
|
||||||
];
|
];
|
||||||
|
|
||||||
sound.extraConfig = ''
|
environment.etc."asound.conf".source = ./asound.conf;
|
||||||
pcm.!default {
|
|
||||||
type plug
|
|
||||||
slave.pcm "hw:1,0"
|
|
||||||
}
|
|
||||||
|
|
||||||
ctl.!default {
|
|
||||||
type hw
|
|
||||||
card 1
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
16
lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md
Normal file
16
lenovo/yoga/7/14ARH7/ATTR-SET-DEPRECATION.md
Normal 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)
|
|
@ -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;
|
assertions = [
|
||||||
nvidia = import ./nvidia;
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ in {
|
||||||
./kernel
|
./kernel
|
||||||
];
|
];
|
||||||
|
|
||||||
microsoft-surface.kernelVersion = mkDefault "6.6";
|
microsoft-surface.kernelVersion = mkDefault "6.10";
|
||||||
|
|
||||||
# Seems to be required to properly enable S0ix "Modern Standby":
|
# Seems to be required to properly enable S0ix "Modern Standby":
|
||||||
boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ];
|
boot.kernelParams = mkDefault [ "mem_sleep_default=deep" ];
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./linux-6.9.x
|
./linux-6.10.x
|
||||||
];
|
];
|
||||||
|
|
||||||
options.microsoft-surface.kernelVersion = mkOption {
|
options.microsoft-surface.kernelVersion = mkOption {
|
||||||
|
|
|
@ -7,14 +7,14 @@ let
|
||||||
|
|
||||||
cfg = config.microsoft-surface;
|
cfg = config.microsoft-surface;
|
||||||
|
|
||||||
version = "6.9.3";
|
version = "6.10.3";
|
||||||
kernelPatches = surfacePatches {
|
kernelPatches = surfacePatches {
|
||||||
inherit version;
|
inherit version;
|
||||||
patchFn = ./patches.nix;
|
patchFn = ./patches.nix;
|
||||||
};
|
};
|
||||||
kernelPackages = linuxPackage {
|
kernelPackages = linuxPackage {
|
||||||
inherit version kernelPatches;
|
inherit version kernelPatches;
|
||||||
sha256 = "1bnzxparybwh320019pr2msaapas41dhjmvg4gy791rn05jc88f3";
|
sha256 = "1666dypfg193l5460maadki4hc291hr7k9fw74nq21fxczyj4pzs";
|
||||||
ignoreConfigErrors=true;
|
ignoreConfigErrors=true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,7 +48,7 @@ let
|
||||||
|
|
||||||
isVersionOf = kernelVersion: version:
|
isVersionOf = kernelVersion: version:
|
||||||
# Test if the provided version is considered one of the list of versions from above:
|
# Test if the provided version is considered one of the list of versions from above:
|
||||||
elem version (versionsOf version);
|
elem kernelVersion (versionsOf version);
|
||||||
|
|
||||||
in {
|
in {
|
||||||
inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfEnum;
|
inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfEnum;
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
linux-surface = fetchFromGitHub {
|
linux-surface = fetchFromGitHub {
|
||||||
owner = "linux-surface";
|
owner = "linux-surface";
|
||||||
repo = "linux-surface";
|
repo = "linux-surface";
|
||||||
rev = "arch-6.9.3-1";
|
rev = "arch-6.10.3-1";
|
||||||
hash = "sha256-HoG7MuWAtiTAX9CJeqCGrfkfoue7XLtSMF6zjx4z7i8=";
|
hash = "sha256-T7voXofI5W+YodHB2DtNSKKc4iUlN3NS0onP4TKFvQM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# This is the owner and repo for the pre-patched kernel from the "linux-surface" project:
|
# This is the owner and repo for the pre-patched kernel from the "linux-surface" project:
|
||||||
|
|
5
omen/16-n0280nd/README.md
Normal file
5
omen/16-n0280nd/README.md
Normal 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`.
|
21
omen/16-n0280nd/default.nix
Normal file
21
omen/16-n0280nd/default.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
|
@ -12,18 +12,18 @@ in {
|
||||||
};
|
};
|
||||||
wifiCard = lib.mkOption {
|
wifiCard = lib.mkOption {
|
||||||
type = lib.types.enum [ "redpine" "sparklan" "none" ];
|
type = lib.types.enum [ "redpine" "sparklan" "none" ];
|
||||||
description = lib.mdDoc ''
|
description = ''
|
||||||
Which wi-fi card is installed in your phone.
|
Which wi-fi card is installed in your phone.
|
||||||
|
|
||||||
Phones shipped before January 2023 have redpine, newer phones have sparklan.
|
Phones shipped before January 2023 have redpine, newer phones have sparklan.
|
||||||
'';
|
'';
|
||||||
default = "redpine";
|
default = "redpine";
|
||||||
};
|
};
|
||||||
customInitrdModules = lib.mkEnableOption (lib.mdDoc "use of custom kernel modules in the initrd.");
|
customInitrdModules = lib.mkEnableOption "use of custom kernel modules in the initrd.";
|
||||||
installUdevPackages = lib.mkEnableOption (lib.mdDoc "installation of udev packages from librem5-base.");
|
installUdevPackages = lib.mkEnableOption "installation of udev packages from librem5-base.";
|
||||||
lockdownFix = lib.mkEnableOption (lib.mdDoc "fix for orientation and proximity sensors not working after lockdown.");
|
lockdownFix = lib.mkEnableOption "fix for orientation and proximity sensors not working after lockdown.";
|
||||||
audio = lib.mkOption {
|
audio = lib.mkOption {
|
||||||
description = lib.mdDoc ''
|
description = ''
|
||||||
Whether to enable and configure PulseAudio for the Librem5 modem.
|
Whether to enable and configure PulseAudio for the Librem5 modem.
|
||||||
|
|
||||||
This is required for audio during calls to work at all.
|
This is required for audio during calls to work at all.
|
||||||
|
|
|
@ -13,7 +13,7 @@ in
|
||||||
unmuteAmp = lib.mkOption {
|
unmuteAmp = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = lib.mdDoc ''
|
description = ''
|
||||||
"one-shot" unmute when kernel module first loads.
|
"one-shot" unmute when kernel module first loads.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@ in
|
||||||
autoMuteAmp = lib.mkOption {
|
autoMuteAmp = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
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.
|
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.)
|
(Reopening the device within the five-second close window will cancel mute.)
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue