mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
Rename xorg.target to graphical-session.target
Also make sure graphical-session.target is generated.
This commit is contained in:
@@ -22,7 +22,7 @@ with lib;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "xorg.target" ];
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
|
||||
@@ -45,7 +45,7 @@ in
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "xorg.target" ];
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ with lib;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "xorg.target" ];
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
|
||||
@@ -16,7 +16,7 @@ with lib;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "xorg.target" ];
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
|
||||
@@ -51,7 +51,7 @@ in
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "xorg.target" ];
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ in
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "xorg.target" ];
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ with lib;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "xorg.target" ];
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ with lib;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "xorg.target" ];
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user