Permalink
Browse files

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

  • Loading branch information...
1 parent 2b305d7 commit dab6bbe3a691cafac994e1782d9141ddd1861f1b @edolstra edolstra committed Jun 19, 2012
Showing with 6 additions and 8 deletions.
  1. +6 −8 modules/services/x11/xserver.nix
View
14 modules/services/x11/xserver.nix
@@ -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

0 comments on commit dab6bbe

Please sign in to comment.