From dd0e71d686146389a46decab8bb14be1dac264a0 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Mon, 9 Jan 2017 22:45:42 +0100 Subject: [PATCH] Rename xorg.target to graphical-session.target Also make sure graphical-session.target is generated. --- modules/services/dunst.nix | 2 +- modules/services/gnome-keyring.nix | 2 +- modules/services/keepassx.nix | 2 +- modules/services/network-manager-applet.nix | 2 +- modules/services/random-background.nix | 2 +- modules/services/taffybar.nix | 2 +- modules/services/udiskie.nix | 2 +- modules/services/xscreensaver.nix | 2 +- modules/xsession.nix | 14 +++++++++++--- 9 files changed, 19 insertions(+), 11 deletions(-) diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index 8042cf93..4d866cec 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -22,7 +22,7 @@ with lib; }; Install = { - WantedBy = [ "xorg.target" ]; + WantedBy = [ "graphical-session.target" ]; }; Service = { diff --git a/modules/services/gnome-keyring.nix b/modules/services/gnome-keyring.nix index e5040906..b0edeaed 100644 --- a/modules/services/gnome-keyring.nix +++ b/modules/services/gnome-keyring.nix @@ -45,7 +45,7 @@ in }; Install = { - WantedBy = [ "xorg.target" ]; + WantedBy = [ "graphical-session.target" ]; }; }; }; diff --git a/modules/services/keepassx.nix b/modules/services/keepassx.nix index 799f0e5c..0ed90dd0 100644 --- a/modules/services/keepassx.nix +++ b/modules/services/keepassx.nix @@ -16,7 +16,7 @@ with lib; }; Install = { - WantedBy = [ "xorg.target" ]; + WantedBy = [ "graphical-session.target" ]; }; Service = { diff --git a/modules/services/network-manager-applet.nix b/modules/services/network-manager-applet.nix index 8b529c5b..a7a90b61 100644 --- a/modules/services/network-manager-applet.nix +++ b/modules/services/network-manager-applet.nix @@ -16,7 +16,7 @@ with lib; }; Install = { - WantedBy = [ "xorg.target" ]; + WantedBy = [ "graphical-session.target" ]; }; Service = { diff --git a/modules/services/random-background.nix b/modules/services/random-background.nix index 0dabb872..d0412310 100644 --- a/modules/services/random-background.nix +++ b/modules/services/random-background.nix @@ -51,7 +51,7 @@ in }; Install = { - WantedBy = [ "xorg.target" ]; + WantedBy = [ "graphical-session.target" ]; }; }; } diff --git a/modules/services/taffybar.nix b/modules/services/taffybar.nix index f9ab2ee6..87a84063 100644 --- a/modules/services/taffybar.nix +++ b/modules/services/taffybar.nix @@ -34,7 +34,7 @@ in }; Install = { - WantedBy = [ "xorg.target" ]; + WantedBy = [ "graphical-session.target" ]; }; }; }; diff --git a/modules/services/udiskie.nix b/modules/services/udiskie.nix index 964629c7..3fb038a7 100644 --- a/modules/services/udiskie.nix +++ b/modules/services/udiskie.nix @@ -22,7 +22,7 @@ with lib; }; Install = { - WantedBy = [ "xorg.target" ]; + WantedBy = [ "graphical-session.target" ]; }; }; }; diff --git a/modules/services/xscreensaver.nix b/modules/services/xscreensaver.nix index 58261553..0b1a4573 100644 --- a/modules/services/xscreensaver.nix +++ b/modules/services/xscreensaver.nix @@ -20,7 +20,7 @@ with lib; }; Install = { - WantedBy = [ "xorg.target" ]; + WantedBy = [ "graphical-session.target" ]; }; }; }; diff --git a/modules/xsession.nix b/modules/xsession.nix index ab662974..ec6d4505 100644 --- a/modules/xsession.nix +++ b/modules/xsession.nix @@ -34,7 +34,7 @@ in }; Install = { - WantedBy = [ "xorg.target" ]; + WantedBy = [ "graphical-session.target" ]; }; Service = { @@ -53,6 +53,14 @@ in }; }; + # A basic graphical session target. Apparently this will come + # standard in future Systemd versions. + systemd.user.targets.graphical-session = { + Unit = { + Description = "Graphical session"; + }; + }; + home.file.".xsession" = { mode = "555"; text = '' @@ -64,13 +72,13 @@ in systemctl --user import-environment SSH_AUTH_SOCK systemctl --user import-environment XDG_DATA_DIRS systemctl --user import-environment XDG_RUNTIME_DIR - systemctl --user start xorg.target + systemctl --user start graphical-session.target ${cfg.initExtra} ${cfg.windowManager} - systemctl --user stop xorg.target + systemctl --user stop graphical-session.target ''; }; };