diff options
author | Florian Klink <flokli@flokli.de> | 2020-12-12 21:19:24 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2020-12-12 21:21:51 +0100 |
commit | 536988b35efbff449d0398319e13da09af8d0d5e (patch) | |
tree | 73a03c4f25b5654c21c1f6e63db5ac64652b7abf /nixos/modules/config | |
parent | 3043fe5b849c48cf242ec59d1ee1cf0778a107e8 (diff) |
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
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/console.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/config/console.nix b/nixos/modules/config/console.nix index f662ed62d31dc..374c23f13ef35 100644 --- a/nixos/modules/config/console.nix +++ b/nixos/modules/config/console.nix @@ -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 ]; }; |