feat: remap caps lock to escape on every host

Sets the xkb layout and `caps:escape_shifted_capslock` in the shared base
config, and builds the console keymap from it so the remap applies on a
bare TTY rather than only under a graphical session. Shift+Caps Lock
still toggles Caps Lock.

neogaia's `console.keyMap` is dropped: `console.useXkbConfig` defines
that option itself, so the two definitions would conflict.
This commit is contained in:
2026-07-19 11:43:41 -04:00
parent 7809e079e3
commit 066bf467ba
2 changed files with 8 additions and 1 deletions

View File

@@ -39,5 +39,4 @@
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
console.keyMap = "us";
} }

View File

@@ -58,6 +58,14 @@ in
]; ];
environment.systemPackages = [ pkgs.git ]; environment.systemPackages = [ pkgs.git ];
# Caps Lock is a second Escape; Shift+Caps Lock still toggles Caps Lock.
services.xserver.xkb.layout = "us";
services.xserver.xkb.options = "caps:escape_shifted_capslock";
# Compile the console keymap from the layout above, so the remap holds on a
# bare TTY and not only under a graphical session.
console.useXkbConfig = true;
# Primary user, in the wheel group. No password set here. # Primary user, in the wheel group. No password set here.
users.users.${user.name} = { users.users.${user.name} = {
isNormalUser = true; isNormalUser = true;