Compare commits

..
Author SHA1 Message Date
K900 f9a55f8d23 common/pc: only enable xf86-input-libinput when X is enabled 2024-04-10 17:04:36 +03:00
27 changed files with 23 additions and 253 deletions

No files matched your search

+2 -1
View File
@@ -5,7 +5,8 @@ queue_rules:
defaults:
actions:
queue:
merge_method: rebase
allow_merging_configuration_change: true
method: rebase
pull_request_rules:
- name: merge using the merge queue
conditions:
+1 -6
View File
@@ -80,7 +80,6 @@ See code for all available configurations.
| [Apple MacBook Pro 11,5](apple/macbook-pro/11-5) | `<nixos-hardware/apple/macbook-pro/11-5>` |
| [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `<nixos-hardware/apple/macbook-pro/12-1>` |
| [Apple MacBook Pro 14,1](apple/macbook-pro/14-1) | `<nixos-hardware/apple/macbook-pro/14-1>` |
| [Apple MacMini (2010, Intel, Nvidia)](apple/macmini/4) | `<nixos-hardware/apple/macmini/4>` |
| [Apple Macs with a T2 Chip](apple/t2) | `<nixos-hardware/apple/t2>` |
| [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>` |
@@ -144,7 +143,6 @@ See code for all available configurations.
| [Framework 12th Gen Intel Core](framework/13-inch/12th-gen-intel) | `<nixos-hardware/framework/13-inch/12th-gen-intel>` |
| [Framework 13th Gen Intel Core](framework/13-inch/13th-gen-intel) | `<nixos-hardware/framework/13-inch/13th-gen-intel>` |
| [Framework 13 AMD Ryzen 7040 Series](framework/13-inch/7040-amd) | `<nixos-hardware/framework/13-inch/7040-amd>` |
| [Framework 16 AMD Ryzen 7040 Series](framework/16-inch/cpu/7040-amd) | `<nixos-hardware/framework/16-inch/cpu/7040-amd>` |
| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `<nixos-hardware/friendlyarm/nanopc-t4>` |
| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `<nixos-hardware/friendlyarm/nanopi-r5s>` |
| [Focus M2 Gen 1](focus/m2/gen1) | `<nixos-hardware/focus/m2/gen1>` |
@@ -240,8 +238,7 @@ See code for all available configurations.
| [Lenovo ThinkPad X280](lenovo/thinkpad/x280) | `<nixos-hardware/lenovo/thinkpad/x280>` |
| [Lenovo ThinkPad X390](lenovo/thinkpad/x390) | `<nixos-hardware/lenovo/thinkpad/x390>` |
| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `<nixos-hardware/lenovo/thinkpad/z>` |
| [Lenovo ThinkPad Z13 Gen 1](lenovo/thinkpad/z/gen1/z13) | `<nixos-hardware/lenovo/thinkpad/z/gen1/z13>` |
| [Lenovo ThinkPad Z13 Gen 2](lenovo/thinkpad/z/gen2/z13) | `<nixos-hardware/lenovo/thinkpad/z/gen2/z13>` |
| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `<nixos-hardware/lenovo/thinkpad/z/z13>` |
| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `<nixos-hardware/lenovo/yoga/6/13ALC6>` |
| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `<nixos-hardware/lenovo/yoga/7/14ARH7/amdgpu>` |
| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `<nixos-hardware/lenovo/yoga/7/14ARH7/nvidia>` |
@@ -277,7 +274,6 @@ See code for all available configurations.
| [Purism Librem 5r4](purism/librem/5r4) | `<nixos-hardware/purism/librem/5r4>` |
| [Raspberry Pi 2](raspberry-pi/2) | `<nixos-hardware/raspberry-pi/2>` |
| [Raspberry Pi 4](raspberry-pi/4) | `<nixos-hardware/raspberry-pi/4>` |
| [Raspberry Pi 5](raspberry-pi/5) | `<nixos-hardware/raspberry-pi/5>` |
| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `<nixos-hardware/samsung/np900x3c>` |
| [StarFive VisionFive v1](starfive/visionfive/v1) | `<nixos-hardware/starfive/visionfive/v1>` |
| [StarFive VisionFive 2](starfive/visionfive/v2) | `<nixos-hardware/starfive/visionfive/v2>` |
@@ -290,5 +286,4 @@ See code for all available configurations.
| [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `<nixos-hardware/toshiba/swanky>` |
| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `<nixos-hardware/tuxedo/infinitybook/v4>` |
| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `<nixos-hardware/tuxedo/infinitybook/pro14/gen7>` |
| [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `<nixos-hardware/tuxedo/pulse/14/gen3>` |
| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `<nixos-hardware/tuxedo/pulse/15/gen2>` |
-28
View File
@@ -1,28 +0,0 @@
{
lib,
...
}:
let
inherit (lib) mkDefault;
in
{
imports = [
../.
];
services.xserver.videoDrivers = mkDefault [ "nvidiaLegacy340" ];
hardware.opengl = {
enable = mkDefault true;
driSupport = mkDefault true;
driSupport32Bit = mkDefault true;
};
hardware.nvidia = {
modesetting.enable = mkDefault true;
powerManagement.enable = mkDefault false;
powerManagement.finegrained = mkDefault false;
open = mkDefault false;
nvidiaSettings = mkDefault true;
};
}
-6
View File
@@ -1,6 +0,0 @@
{
imports = [
../.
../../common/cpu/intel
];
}
+2
View File
@@ -4,4 +4,6 @@
boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [
"ath3k"
];
services.xserver.libinput.enable = lib.mkDefault config.services.xserver.enable;
}
+1 -6
View File
@@ -13,7 +13,6 @@
apple-macbook-pro-11-5 = import ./apple/macbook-pro/11-5;
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-t2 = import ./apple/t2;
asus-battery = import ./asus/battery.nix;
asus-ally-rc71l = import ./asus/ally/rc71l;
@@ -77,7 +76,6 @@
framework-12th-gen-intel = import ./framework/13-inch/12th-gen-intel;
framework-13th-gen-intel = import ./framework/13-inch/13th-gen-intel;
framework-13-7040-amd = import ./framework/13-inch/7040-amd;
framework-16-7040-amd = import ./framework/16-inch/cpu/7040-amd;
friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4;
friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s;
focus-m2-gen1 = import ./focus/m2/gen1;
@@ -177,8 +175,7 @@
lenovo-thinkpad-x280 = import ./lenovo/thinkpad/x280;
lenovo-thinkpad-x390 = import ./lenovo/thinkpad/x390;
lenovo-thinkpad-z = import ./lenovo/thinkpad/z;
lenovo-thinkpad-z13-gen1 = import ./lenovo/thinkpad/z/gen1/z13;
lenovo-thinkpad-z13-gen2 = import ./lenovo/thinkpad/z/gen2/z13;
lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13;
lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6;
lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7;
lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8;
@@ -216,7 +213,6 @@
purism-librem-5r4 = import ./purism/librem/5r4;
raspberry-pi-2 = import ./raspberry-pi/2;
raspberry-pi-4 = import ./raspberry-pi/4;
raspberry-pi-5 = import ./raspberry-pi/5;
kobol-helios4 = import ./kobol/helios4;
samsung-np900x3c = import ./samsung/np900x3c;
starfive-visionfive-v1 = import ./starfive/visionfive/v1;
@@ -231,7 +227,6 @@
toshiba-swanky = import ./toshiba/swanky;
tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4;
tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7;
tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3;
tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2;
common-cpu-amd = import ./common/cpu/amd;
-4
View File
@@ -1,4 +0,0 @@
# [Framework Laptop 16](https://frame.work/)
## Updating Firmware
The Framework Laptop 16 uses LVFS, so it can be updated via fwupd; see https://wiki.nixos.org/wiki/Fwupd for details
@@ -1,10 +0,0 @@
{ config, lib, pkgs, ... }:
{
imports = [
../common
../common/amd.nix
../../../../common/cpu/amd/raphael/igpu.nix
];
}
-14
View File
@@ -1,14 +0,0 @@
{ lib, config, ... }: {
imports = [
../../../../common/cpu/amd
../../../../common/cpu/amd/pstate.nix
../../../../common/gpu/amd
];
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"] ;
# AMD has better battery life with PPD over TLP:
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13
services.power-profiles-daemon.enable = lib.mkDefault true;
}
-27
View File
@@ -1,27 +0,0 @@
{ lib, pkgs, ... }: {
imports = [
../../../../common/pc/laptop
../../../../common/pc/laptop/ssd
];
# Fix TRRS headphones missing a mic
# https://community.frame.work/t/headset-microphone-on-linux/12387/3
boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") ''
options snd-hda-intel model=dell-headset-multi
'';
# For fingerprint support
services.fprintd.enable = lib.mkDefault true;
# Custom udev rules
services.udev.extraRules = ''
# Ethernet expansion card support
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
'';
# Needed for desktop environments to detect/manage display brightness
hardware.sensor.iio.enable = lib.mkDefault true;
# Enable keyboard customization
hardware.keyboard.qmk.enable = lib.mkDefault true;
}
+2 -2
View File
@@ -4,7 +4,7 @@ This document on how I configure [NixOS](https://nixos.org/) on [NanoPC-T4](http
# Installation
To install NixOS on you can follow the [official instructions](https://wiki.nixos.org/wiki/NixOS_on_ARM/NanoPC-T4) and use the [pre-built images](https://github.com/tmountain/arch-nanopct4/tree/main/images/) from @tmountain. You can also build the U-Boot image yourself from `nixpkgs` based on changes added in [#111034](https://github.com/NixOS/nixpkgs/pull/111034).
To install NixOS on you can follow the [official instructions](https://nixos.wiki/wiki/NixOS_on_ARM/NanoPC-T4) and use the [pre-built images](https://github.com/tmountain/arch-nanopct4/tree/main/images/) from @tmountain. You can also build the U-Boot image yourself from `nixpkgs` based on changes added in [#111034](https://github.com/NixOS/nixpkgs/pull/111034).
## NixOS on NVMe with ZFS
@@ -62,7 +62,7 @@ A reader using `CP2102` chip did not work but `FT232RL` works fine:
You can use `minicom` or `picocom` to connect:
```
sudo minicom -b 1500000 -D /dev/ttyUSB0
sudo minicom -b 1500000 -D /dev/ttyUSB0
sudo picocom -b 1500000 /dev/ttyUSB0
```
But you'll need to disable flow control with `Ctrl-A x`.
+4 -1
View File
@@ -7,14 +7,17 @@
../../../common/pc/laptop
../../../common/pc/laptop/acpi_call.nix
../../../common/pc/laptop/ssd
../../../common/hidpi.nix # can be dropped after nixos 23.05
];
# kernel versions prior to 5.18 won't boot
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest);
hardware.enableRedistributableFirmware = lib.mkDefault true;
hardware.trackpoint.device = lib.mkDefault "TPPS/2 Elan TrackPoint";
services.fprintd.enable = lib.mkDefault true;
# kernel versions below 6.0 don’t contain ACPI suspend2idle drivers for the Z-series’ AMD hardware
# kernel versions below 6.0 don't contain ACPI suspend2idle drivers for the Z13s AMD hardware
# my Z13 froze after waking up from suspend/ hibernate
services.logind.lidSwitch = lib.mkIf (lib.versionOlder pkgs.linux.version "6.00") (lib.mkDefault "lock");
}
-8
View File
@@ -1,8 +0,0 @@
{ lib, pkgs, ... }: {
imports = [
../../../../lenovo/thinkpad/z
];
# Kernel 5.18 is required for the Ryzen 6000 series
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18") (lib.mkDefault pkgs.linuxPackages_latest);
}
-5
View File
@@ -1,5 +0,0 @@
{
imports = [
../../../../../lenovo/thinkpad/z/gen1
];
}
-44
View File
@@ -1,44 +0,0 @@
{ lib, pkgs, ... }:
{
imports = [
../../../../lenovo/thinkpad/z
];
# Kernel 6.4 is required for the Ryzen 7040 series
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.4") (lib.mkDefault pkgs.linuxPackages_latest);
systemd.services = {
# Modified from Arch Wiki
"touchpad-fix" = {
enable = lib.mkDefault true;
description = "I2C HID devices can fail to initialize so try to reload";
unitConfig = {
Type = "oneshot";
};
serviceConfig = {
User = "root";
};
wantedBy = [ "multi-user.target" ];
after = [ "multi-user.target" ];
script = ''
count=0
while true; do
${lib.getExe pkgs.libinput} list-devices | ${lib.getExe pkgs.gnugrep} --quiet SNSL && break
count=$((count + 1))
if test $count -ge 5; then
echo "Touchpad not read after $count attempts"
break
fi
echo "Touchpad not ready; attempt $count to reload"
${pkgs.kmod}/bin/rmmod i2c_hid_acpi
${pkgs.kmod}/bin/modprobe i2c_hid_acpi
sleep $((2 + (count * 3)))
done
'';
};
};
}
-19
View File
@@ -1,19 +0,0 @@
{ pkgs, lib, ...}:
{
imports = [
../../../../../lenovo/thinkpad/z/gen2
];
sound.extraConfig = ''
pcm.!default {
type plug
slave.pcm "hw:1,0"
}
ctl.!default {
type hw
card 1
}
'';
}
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
../../../../lenovo/thinkpad/z
];
}
-10
View File
@@ -1,10 +0,0 @@
{
assertions = [
{
assertion = true;
message = ''
Lenovo Z-series received a second generation so the hardware configuration has been split by generation. For the Z13 Gen 1 config, change from `lenovo-thinkpad-z13` to `lenovo-thinkpad-z13-gen1`.
'';
}
];
}
+1 -1
View File
@@ -5,7 +5,7 @@ let
in {
imports = [
./linux-6.8.x
./linux-6.6.x
];
options.microsoft-surface.kernelVersion = mkOption {
@@ -7,14 +7,14 @@ let
cfg = config.microsoft-surface;
version = "6.8.6";
version = "6.6.25";
kernelPatches = surfacePatches {
inherit version;
patchFn = ./patches.nix;
};
kernelPackages = linuxPackage {
inherit version kernelPatches;
sha256 = "sha256-nnIyMtYDq0Xr8EPDRxTEjyd6sZXCmry4Ry8qTDpaGZU=";
sha256 = "0i0zvqlj02rm6wpbidji0rn9559vrpfc1b8gbfjk70lhhyz11llr";
ignoreConfigErrors=true;
};
+2 -2
View File
@@ -4,8 +4,8 @@
linux-surface = fetchFromGitHub {
owner = "linux-surface";
repo = "linux-surface";
rev = "arch-6.8.6-1";
hash = "sha256-kLnHcYFeQ7/8lbSL4p9D2aC4V/Ib1tU225UOkRcNnH4=";
rev = "arch-6.6.6-1";
hash = "sha256-0pP/A0XllR/iheIBEBwEApaXpyFYzsnGZ+wdm4w5Jjg=";
};
# This is the owner and repo for the pre-patched kernel from the "linux-surface" project:
-34
View File
@@ -1,34 +0,0 @@
{ lib, pkgs, config, ... }:
{
nixpkgs.overlays = [
(import ./overlay.nix)
];
boot = {
kernelPackages = lib.mkDefault (pkgs.linuxPackagesFor pkgs.linux_rpi5);
initrd.availableKernelModules = [
"nvme"
"usbhid"
"usb_storage"
];
};
# Needed for Xorg to start (https://github.com/raspberrypi-ui/gldriver-test/blob/master/usr/lib/systemd/scripts/rp1_test.sh)
# This won't work for displays connected to the RP1 (DPI/composite/MIPI DSI), since I don't have one to test.
services.xserver.extraConfig = ''
Section "OutputClass"
Identifier "vc4"
MatchDriver "vc4"
Driver "modesetting"
Option "PrimaryGPU" "true"
EndSection
'';
assertions = [
{
assertion = (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.1.54");
message = "The Raspberry Pi 5 requires a newer kernel version (>=6.1.54). Please upgrade nixpkgs for this system.";
}
];
}
-6
View File
@@ -1,6 +0,0 @@
final: _prev: {
linux_rpi5 = final.linux_rpi4.override {
rpiVersion = 5;
argsOverride.defconfig = "bcm2712_defconfig";
};
}
+1 -1
View File
@@ -81,7 +81,7 @@ def write_eval_test(f: IO[str], profiles: list[str]) -> None:
continue
system = "x86_64-linux"
if "raspberry-pi/4" == profile or "raspberry-pi/5" == profile:
if "raspberry-pi/4" == profile:
system = "aarch64-linux"
f.write(
-7
View File
@@ -1,7 +0,0 @@
# TUXEDO Pulse 14 - Gen3
## About
[NixOS hardware configuration](https://github.com/NixOS/nixos-hardware) for
[TUXEDO Pulse 14 -
Gen3](https://www.tuxedocomputers.com/en/TUXEDO-Pulse-14-Gen3).
-9
View File
@@ -1,9 +0,0 @@
{pkgs, ...}: {
imports = [
../../../../common/cpu/amd
../../../../common/cpu/amd/pstate.nix
../../../../common/cpu/amd/raphael/igpu.nix
../../../../common/pc/laptop
../../../../common/pc/laptop/ssd
];
}