kbd module: don't setup vconsoles if we are in a container
This commit is contained in:
parent
0024c10a5c
commit
7ab80e8f79
@ -12,6 +12,8 @@ let
|
|||||||
FONT=${config.i18n.consoleFont}
|
FONT=${config.i18n.consoleFont}
|
||||||
${colors}
|
${colors}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
setVconsole = !config.boot.isContainer;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -41,14 +43,21 @@ in
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = {
|
config = mkMerge [
|
||||||
|
(mkIf (!setVconsole) {
|
||||||
|
systemd.services."systemd-vconsole-setup".enable = false;
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkIf setVconsole {
|
||||||
environment.systemPackages = [ pkgs.kbd ];
|
environment.systemPackages = [ pkgs.kbd ];
|
||||||
|
|
||||||
# Let systemd-vconsole-setup.service do the work of setting up the
|
# Let systemd-vconsole-setup.service do the work of setting up the
|
||||||
# virtual consoles. FIXME: trigger a restart of
|
# virtual consoles. FIXME: trigger a restart of
|
||||||
# systemd-vconsole-setup.service if /etc/vconsole.conf changes.
|
# systemd-vconsole-setup.service if /etc/vconsole.conf changes.
|
||||||
environment.etc."vconsole.conf".source = vconsoleConf;
|
environment.etc = [ {
|
||||||
|
target = "vconsole.conf";
|
||||||
|
source = vconsoleConf;
|
||||||
|
} ];
|
||||||
|
|
||||||
# This is identical to the systemd-vconsole-setup.service unit
|
# This is identical to the systemd-vconsole-setup.service unit
|
||||||
# shipped with systemd, except that it uses /dev/tty1 instead of
|
# shipped with systemd, except that it uses /dev/tty1 instead of
|
||||||
@ -60,7 +69,7 @@ in
|
|||||||
after = [ "systemd-udev-settle.service" ];
|
after = [ "systemd-udev-settle.service" ];
|
||||||
restartTriggers = [ vconsoleConf ];
|
restartTriggers = [ vconsoleConf ];
|
||||||
};
|
};
|
||||||
|
})
|
||||||
};
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user