···12 FONT=${config.i18n.consoleFont}
13 ${colors}
14 '';
0015in
1617{
···4142 ###### implementation
4344- config = {
0004546- environment.systemPackages = [ pkgs.kbd ];
04748- # Let systemd-vconsole-setup.service do the work of setting up the
49- # virtual consoles. FIXME: trigger a restart of
50- # systemd-vconsole-setup.service if /etc/vconsole.conf changes.
51- environment.etc."vconsole.conf".source = vconsoleConf;
0005253- # This is identical to the systemd-vconsole-setup.service unit
54- # shipped with systemd, except that it uses /dev/tty1 instead of
55- # /dev/tty0 to prevent putting the X server in non-raw mode, and
56- # it has a restart trigger.
57- systemd.services."systemd-vconsole-setup" =
58- { wantedBy = [ "multi-user.target" ];
59- before = [ "display-manager.service" ];
60- after = [ "systemd-udev-settle.service" ];
61- restartTriggers = [ vconsoleConf ];
62- };
63-64- };
6566}
···12 FONT=${config.i18n.consoleFont}
13 ${colors}
14 '';
15+16+ setVconsole = !config.boot.isContainer;
17in
1819{
···4344 ###### implementation
4546+ config = mkMerge [
47+ (mkIf (!setVconsole) {
48+ systemd.services."systemd-vconsole-setup".enable = false;
49+ })
5051+ (mkIf setVconsole {
52+ environment.systemPackages = [ pkgs.kbd ];
5354+ # Let systemd-vconsole-setup.service do the work of setting up the
55+ # virtual consoles. FIXME: trigger a restart of
56+ # systemd-vconsole-setup.service if /etc/vconsole.conf changes.
57+ environment.etc = [ {
58+ target = "vconsole.conf";
59+ source = vconsoleConf;
60+ } ];
6162+ # This is identical to the systemd-vconsole-setup.service unit
63+ # shipped with systemd, except that it uses /dev/tty1 instead of
64+ # /dev/tty0 to prevent putting the X server in non-raw mode, and
65+ # it has a restart trigger.
66+ systemd.services."systemd-vconsole-setup" =
67+ { wantedBy = [ "multi-user.target" ];
68+ before = [ "display-manager.service" ];
69+ after = [ "systemd-udev-settle.service" ];
70+ restartTriggers = [ vconsoleConf ];
71+ };
72+ })
73+ ];
7475}