summary refs log tree commit diff
path: root/nixos/modules/config/console.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/config/console.nix')
-rw-r--r--nixos/modules/config/console.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/config/console.nix b/nixos/modules/config/console.nix
index f662ed62d31..374c23f13ef 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 ];
           };