From 3562c1d5c6ff868924fe95ba7b51344f3c141311 Mon Sep 17 00:00:00 2001 From: oxalica Date: Wed, 22 Jun 2022 11:35:11 +0800 Subject: [PATCH] nixos/console: add required store paths to initrd for systemd stage 1 `console.{font,keyMap}` may be a path or a string to a store path, which should be added to initrd for `systemd-vconsole-setup` before the prompt for the LUKS password. --- nixos/modules/config/console.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/config/console.nix b/nixos/modules/config/console.nix index b60fc55851da..9a8163f2250d 100644 --- a/nixos/modules/config/console.nix +++ b/nixos/modules/config/console.nix @@ -159,7 +159,11 @@ in "${config.boot.initrd.systemd.package}/lib/systemd/systemd-vconsole-setup" "${config.boot.initrd.systemd.package.kbd}/bin/setfont" "${config.boot.initrd.systemd.package.kbd}/bin/loadkeys" - "${config.boot.initrd.systemd.package.kbd.gzip}/bin/gzip" # keyboard layouts are compressed + "${config.boot.initrd.systemd.package.kbd.gzip}/bin/gzip" # Fonts and keyboard layouts are compressed + ] ++ optionals (hasPrefix builtins.storeDir cfg.font) [ + "${cfg.font}" + ] ++ optionals (hasPrefix builtins.storeDir cfg.keyMap) [ + "${cfg.keyMap}" ]; systemd.services.reload-systemd-vconsole-setup =