fix(keyboard): carry the configured layout to the LUKS prompt

Setting only services.xserver.xkb.layout moves the graphical session but
leaves console.useXkbConfig unset, so the virtual-console keymap -- and the
systemd initrd the LUKS passphrase prompt runs in -- fall back to US (seen
on a Latitude 5410: X11 Layout gb, VC Keymap unset, LUKS prompt US).

Default console.useXkbConfig + console.earlySetup + boot.initrd.systemd.enable
distro-wide, so xkb.layout alone reaches the console and the encrypted-disk
prompt. Moved the latter two out of plymouth.nix -- they no longer hinge on
the splash being enabled. All mkDefault: an explicit console.keyMap or a
scripted initrd still wins.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-06-14 12:11:20 +01:00
parent 69f7ae9051
commit 2c8e0b47f9
2 changed files with 24 additions and 4 deletions

View File

@@ -80,11 +80,12 @@ let
in
{
config = lib.mkIf cfg.plymouth.enable {
# Plymouth wants the systemd initrd (also what applies the keyboard
# layout to the LUKS prompt) and a quiet console around it.
boot.initrd.systemd.enable = lib.mkDefault true;
# The systemd initrd (boot.initrd.systemd.enable) and console.earlySetup
# that Plymouth needs are now distro-wide defaults in ./default.nix
# (they also carry the keyboard layout to the LUKS prompt), so the
# splash no longer has to turn them on. Just keep the console quiet
# around the splash.
boot.initrd.verbose = lib.mkDefault false;
console.earlySetup = lib.mkDefault true;
boot.consoleLogLevel = lib.mkDefault 0;
boot.plymouth = {