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:
@@ -58,6 +58,14 @@ in
|
||||
];
|
||||
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.
|
||||
users.users.${user.name} = {
|
||||
isNormalUser = true;
|
||||
|
||||
Reference in New Issue
Block a user