Merge pull request #170131 from helsinki-systems/feat/systemd-stage-1-only-keymap
nixos/console: Allow setting keymap without font
This commit is contained in:
commit
cd7596dff4
|
@ -149,8 +149,11 @@ in
|
||||||
'');
|
'');
|
||||||
|
|
||||||
boot.initrd.systemd.contents = {
|
boot.initrd.systemd.contents = {
|
||||||
"/etc/kbd".source = "${consoleEnv config.boot.initrd.systemd.package.kbd}/share";
|
|
||||||
"/etc/vconsole.conf".source = vconsoleConf;
|
"/etc/vconsole.conf".source = vconsoleConf;
|
||||||
|
# Add everything if we want full console setup...
|
||||||
|
"/etc/kbd" = lib.mkIf cfg.earlySetup { source = "${consoleEnv config.boot.initrd.systemd.package.kbd}/share"; };
|
||||||
|
# ...but only the keymaps if we don't
|
||||||
|
"/etc/kbd/keymaps" = lib.mkIf (!cfg.earlySetup) { source = "${consoleEnv config.boot.initrd.systemd.package.kbd}/share/keymaps"; };
|
||||||
};
|
};
|
||||||
boot.initrd.systemd.storePaths = [
|
boot.initrd.systemd.storePaths = [
|
||||||
"${config.boot.initrd.systemd.package}/lib/systemd/systemd-vconsole-setup"
|
"${config.boot.initrd.systemd.package}/lib/systemd/systemd-vconsole-setup"
|
||||||
|
@ -180,7 +183,7 @@ in
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.earlySetup {
|
(mkIf (cfg.earlySetup && !config.boot.inird.systemd.enable) {
|
||||||
boot.initrd.extraUtilsCommands = ''
|
boot.initrd.extraUtilsCommands = ''
|
||||||
mkdir -p $out/share/consolefonts
|
mkdir -p $out/share/consolefonts
|
||||||
${if substring 0 1 cfg.font == "/" then ''
|
${if substring 0 1 cfg.font == "/" then ''
|
||||||
|
@ -194,10 +197,6 @@ in
|
||||||
cp -L $font $out/share/consolefonts/font.psf
|
cp -L $font $out/share/consolefonts/font.psf
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
assertions = [{
|
|
||||||
assertion = !config.boot.initrd.systemd.enable;
|
|
||||||
message = "console.earlySetup is implied by systemd stage 1";
|
|
||||||
}];
|
|
||||||
})
|
})
|
||||||
]))
|
]))
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue