yep, more dotfiles

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

wiro.world 7077f4e9 89a9c0c6

verified
+46
+19
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 + # Applying patches to systemd-boot that do not change the version require 11 + # to remove the previously installed bootloader at /boot/EFI/systemd/systemd-bootx64.efi 12 + ./systemd-boot-ignore-meta-key.patch 13 + ]; 14 + }); 15 + in 6 16 { 7 17 imports = [ ]; 8 18 9 19 config = { 10 20 system.stateVersion = "23.05"; 21 + 22 + systemd.package = patched-systemd; 23 + 24 + # Disable the meta key at the kernel level, rebind unused right alt to meta 25 + services.udev.extraHwdb = '' 26 + evdev:atkbd:dmi:bvn*:bvr*:bd*:sv*:pn*:pvr* 27 + KEYBOARD_KEY_db=reserved 28 + KEYBOARD_KEY_b8=leftmeta 29 + ''; 11 30 12 31 # --- Generated by `nixos-generate-config` --- 13 32 boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "sdhci_pci" ];
+27
nixos/hardware/systemd-boot-ignore-meta-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 +