yep, more dotfiles

neo-wiro-laptop: apply keyboard patches to disable meta key

wiro.world 7686efcc 89a9c0c6

verified
+43
+27
nixos/hardware/0001-disable-key.patch
··· 1 + From 666eb563eabc461b55b348e997670cfde5e2a0d9 Mon Sep 17 00:00:00 2001 2 + From: Milo Moisson <milo@wiro.world> 3 + Date: Mon, 29 Dec 2025 12:06:29 +0100 4 + Subject: [PATCH] disable key 5 + 6 + --- 7 + src/boot/console.c | 4 ++-- 8 + 1 file changed, 2 insertions(+), 2 deletions(-) 9 + 10 + diff --git a/src/boot/console.c b/src/boot/console.c 11 + index 21b36e5a6e..7ca6664123 100644 12 + --- a/src/boot/console.c 13 + +++ b/src/boot/console.c 14 + @@ -134,8 +134,8 @@ EFI_STATUS console_key_read(uint64_t *ret_key, uint64_t timeout_usec) { 15 + shift |= EFI_CONTROL_PRESSED; 16 + if (keydata.KeyState.KeyShiftState & EFI_ALT_PRESSED) 17 + shift |= EFI_ALT_PRESSED; 18 + - if (keydata.KeyState.KeyShiftState & EFI_LOGO_PRESSED) 19 + - shift |= EFI_LOGO_PRESSED; 20 + + // if (keydata.KeyState.KeyShiftState & EFI_LOGO_PRESSED) 21 + + // shift |= EFI_LOGO_PRESSED; 22 + 23 + /* Shift is not supposed to be reported for keys that can be represented as uppercase 24 + * unicode chars (Shift+f is reported as F instead). Some firmware does it anyway, so 25 + -- 26 + 2.51.2 27 +
+16
nixos/hardware/neo-wiro-laptop.nix
··· 1 1 { config 2 2 , lib 3 + , pkgs 3 4 , ... 4 5 }: 5 6 7 + let 8 + patched-systemd = pkgs.systemd.overrideAttrs (oldAttrs: { 9 + patches = (oldAttrs.patches or [ ]) ++ [ 10 + ./0001-disable-key.patch 11 + ]; 12 + }); 13 + in 6 14 { 7 15 imports = [ ]; 8 16 9 17 config = { 10 18 system.stateVersion = "23.05"; 19 + 20 + systemd.package = patched-systemd; 21 + 22 + services.udev.extraHwdb = '' 23 + evdev:atkbd:dmi:bvn*:bvr*:bd*:sv*:pn*:pvr* 24 + KEYBOARD_KEY_db=reserved 25 + KEYBOARD_KEY_b8=leftmeta 26 + ''; 11 27 12 28 # --- Generated by `nixos-generate-config` --- 13 29 boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "sdhci_pci" ];