From 28cc8474cd27323e8e6b7af1194ea1d4ee600e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sat, 29 Aug 2026 02:28:34 -0600 Subject: [PATCH] fix(emacs): start with graphical session --- modules/home/emacs.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/home/emacs.nix b/modules/home/emacs.nix index 6951719..f77d4ab 100644 --- a/modules/home/emacs.nix +++ b/modules/home/emacs.nix @@ -141,7 +141,7 @@ in { sydmacs ]; }; - + # Set emacsclient as the default editor for the time being. home.sessionVariables = { EDITOR = "emacsclient"; @@ -171,6 +171,14 @@ in { client.enable = true; }; + # Start Emacs after the graphical session so as to inherit + # expected envvars, but don't necessarily /depend/ on a + # graphical session. + systemd.user.services.emacs = { + Unit.After = [ "graphical-session.target" ]; + Install.WantedBy = lib.mkForce [ "graphical-session.target" ]; + }; + # We do this ourselves. stylix.targets.emacs.enable = false; });