···1212 FONT=${config.i18n.consoleFont}
1313 ${colors}
1414 '';
1515+1616+ setVconsole = !config.boot.isContainer;
1517in
16181719{
···41434244 ###### implementation
43454444- config = {
4646+ config = mkMerge [
4747+ (mkIf (!setVconsole) {
4848+ systemd.services."systemd-vconsole-setup".enable = false;
4949+ })
45504646- environment.systemPackages = [ pkgs.kbd ];
5151+ (mkIf setVconsole {
5252+ environment.systemPackages = [ pkgs.kbd ];
47534848- # Let systemd-vconsole-setup.service do the work of setting up the
4949- # virtual consoles. FIXME: trigger a restart of
5050- # systemd-vconsole-setup.service if /etc/vconsole.conf changes.
5151- environment.etc."vconsole.conf".source = vconsoleConf;
5454+ # Let systemd-vconsole-setup.service do the work of setting up the
5555+ # virtual consoles. FIXME: trigger a restart of
5656+ # systemd-vconsole-setup.service if /etc/vconsole.conf changes.
5757+ environment.etc = [ {
5858+ target = "vconsole.conf";
5959+ source = vconsoleConf;
6060+ } ];
52615353- # This is identical to the systemd-vconsole-setup.service unit
5454- # shipped with systemd, except that it uses /dev/tty1 instead of
5555- # /dev/tty0 to prevent putting the X server in non-raw mode, and
5656- # it has a restart trigger.
5757- systemd.services."systemd-vconsole-setup" =
5858- { wantedBy = [ "multi-user.target" ];
5959- before = [ "display-manager.service" ];
6060- after = [ "systemd-udev-settle.service" ];
6161- restartTriggers = [ vconsoleConf ];
6262- };
6363-6464- };
6262+ # This is identical to the systemd-vconsole-setup.service unit
6363+ # shipped with systemd, except that it uses /dev/tty1 instead of
6464+ # /dev/tty0 to prevent putting the X server in non-raw mode, and
6565+ # it has a restart trigger.
6666+ systemd.services."systemd-vconsole-setup" =
6767+ { wantedBy = [ "multi-user.target" ];
6868+ before = [ "display-manager.service" ];
6969+ after = [ "systemd-udev-settle.service" ];
7070+ restartTriggers = [ vconsoleConf ];
7171+ };
7272+ })
7373+ ];
65746675}