Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Set the default unit to "graphical.target" if X11 is enabled

  • Loading branch information...
commit dab6bbe3a691cafac994e1782d9141ddd1861f1b 1 parent 2b305d7
Eelco Dolstra edolstra authored
Showing with 6 additions and 8 deletions.
  1. +6 −8 modules/services/x11/xserver.nix
14 modules/services/x11/xserver.nix
View
@@ -377,15 +377,13 @@ in
environment.pathsToLink =
[ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ];
- jobs."xserver-start-check" =
- { startOn = if cfg.autorun then "filesystem and stopped udevtrigger" else "";
- stopOn = "";
- task = true;
- script = "grep -qv noX11 /proc/cmdline && start xserver || true";
- };
+ boot.systemd.defaultUnit = mkIf cfg.autorun "graphical.target";
+
+ boot.systemd.services."xserver.service" =
+ { wantedBy = [ "graphical.target" ];
+ after = [ "systemd-udev-settle.service" ];
- jobs.xserver =
- { restartIfChanged = false;
+ #restartIfChanged = false;
environment =
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup
Please sign in to comment.
Something went wrong with that request. Please try again.