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:
parent
3043fe5b84
commit
536988b35e
|
@ -159,7 +159,8 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.services.systemd-vconsole-setup =
|
systemd.services.systemd-vconsole-setup =
|
||||||
{ before = [ "display-manager.service" ];
|
{
|
||||||
|
before = optional config.services.xserver.enable "display-manager.service";
|
||||||
after = [ "systemd-udev-settle.service" ];
|
after = [ "systemd-udev-settle.service" ];
|
||||||
restartTriggers = [ vconsoleConf consoleEnv ];
|
restartTriggers = [ vconsoleConf consoleEnv ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue