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

This commit is contained in:
Eelco Dolstra 2012-06-19 14:51:04 -04:00
parent 2b305d7f29
commit dab6bbe3a6

View File

@ -377,15 +377,13 @@ in
environment.pathsToLink = environment.pathsToLink =
[ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ]; [ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ];
jobs."xserver-start-check" = boot.systemd.defaultUnit = mkIf cfg.autorun "graphical.target";
{ startOn = if cfg.autorun then "filesystem and stopped udevtrigger" else "";
stopOn = "";
task = true;
script = "grep -qv noX11 /proc/cmdline && start xserver || true";
};
jobs.xserver = boot.systemd.services."xserver.service" =
{ restartIfChanged = false; { wantedBy = [ "graphical.target" ];
after = [ "systemd-udev-settle.service" ];
#restartIfChanged = false;
environment = environment =
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup { FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup