3
0
Fork 0
forked from mirrors/nixpkgs

nixos/console: fix Before= on the systemd-vconsole-setup unit

Only set Before=display-manager.service if it is actually present.

On headless systems, `systemctl list-units --state not-found` will
otherwise show display-manager.service.

Reported-In: https://github.com/NixOS/nixpkgs/issues/88597
This commit is contained in:
Florian Klink 2020-12-12 21:19:24 +01:00
parent 3043fe5b84
commit 536988b35e

View file

@ -159,7 +159,8 @@ in
'';
systemd.services.systemd-vconsole-setup =
{ before = [ "display-manager.service" ];
{
before = optional config.services.xserver.enable "display-manager.service";
after = [ "systemd-udev-settle.service" ];
restartTriggers = [ vconsoleConf consoleEnv ];
};