add a module for automatically disable internal keyboard

This commit is contained in:
Yan Lin 2025-11-01 22:30:07 +01:00
parent 7f4fa3b1e1
commit 954598068a
2 changed files with 82 additions and 0 deletions

View file

@ -7,6 +7,7 @@
../../../modules/desktop.nix
../../../modules/wireguard.nix
../../../modules/login-display.nix
../../../modules/disable-keyboard.nix
];
# Bootloader - standard UEFI setup
@ -242,12 +243,20 @@
capslock = "leftcontrol";
# Map Right Control to Caps Lock
rightcontrol = "capslock";
# Map Left Alt to Super (Windows key)
leftalt = "leftmeta";
};
};
};
};
};
# Disable internal keyboard when HHKB-Hybrid_1 is connected
services.disable-keyboard = {
enable = true;
externalKeyboardName = "HHKB-Hybrid_1";
};
# Apply XKB config to console (TTY) as well
console.useXkbConfig = true;