Fix EWM session: show tuigreet session picker and stop emacs.service conflict#62
Draft
Copilot wants to merge 6 commits into
Draft
Fix EWM session: show tuigreet session picker and stop emacs.service conflict#62Copilot wants to merge 6 commits into
Copilot wants to merge 6 commits into
Conversation
Co-authored-by: KristianAN <80984519+KristianAN@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add EWM as an optional compositor session
Add EWM as optional session alongside Sway in tuigreet
Mar 3, 2026
Co-authored-by: KristianAN <80984519+KristianAN@users.noreply.github.com>
Copilot
AI
changed the title
Add EWM as optional session alongside Sway in tuigreet
Enable EWM for chase and fix greetd session discovery
Mar 3, 2026
Co-authored-by: KristianAN <80984519+KristianAN@users.noreply.github.com>
Copilot
AI
changed the title
Enable EWM for chase and fix greetd session discovery
EWM: enable for chase, fix greetd session discovery, and use home-manager Emacs
Mar 3, 2026
Co-authored-by: KristianAN <80984519+KristianAN@users.noreply.github.com>
Copilot
AI
changed the title
EWM: enable for chase, fix greetd session discovery, and use home-manager Emacs
EWM: use home-manager Emacs and fix tuigreet session selection
Mar 3, 2026
Co-authored-by: KristianAN <80984519+KristianAN@users.noreply.github.com>
Copilot
AI
changed the title
EWM: use home-manager Emacs and fix tuigreet session selection
Fix EWM session: show tuigreet session picker and stop emacs.service conflict
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EWM was unreachable at login because tuigreet never showed a session picker, and when EWM was launched it immediately failed due to a conflicting Emacs daemon.
Changes
tuigreet: show session selection menu
--cmd swaycaused tuigreet to bypass the session picker entirely and hardcode sway as the launched command, making EWM (and any other registered wayland session) unreachable.Disable
emacs.servicewhen EWM is enabledWhen EWM starts as a Wayland session, it activates
graphical-session.targetwhich also starts the standaloneemacs.servicedaemon. This second Emacs instance loadsinit.elwith the EWM elisp package but outside of EWM's managed context — causing Emacs to send a stop signal back to the compositor (ewm.serviceexits 1:Stop requested from Emacs).EWM manages its own Emacs lifecycle; the standalone daemon is redundant and conflicting when EWM is active.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
codeberg.org/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Goal
Add EWM (Emacs Wayland Manager) as an optional compositor/session that can be selected at the login screen (tuigreet) alongside the existing Sway session. Sway must remain fully intact and the default.
EWM flake info
EWM has a proper flake at
https://codeberg.org/ezemtsov/ewm.git(branchmaster). The relevant flake outputs are:Full flake.nix for reference:
Required changes
1.
flake.nix— Add EWM flake input and wire it upAdd a new input:
Add
ewm = false;to each host config inhostConfigs(sky, rubble, chase), alongside the existingslackanddiscordoptions underprograms:In the
mkNixosSystemfunction, add the EWM NixOS module to themoduleslist:And wire up the enable flag similarly to slack/discord:
2.
modules/nixos/programs/ewm.nix— New NixOS module (optional enable wrapper)Create a new file
modules/nixos/programs/ewm.nixfollowing the exact same pattern asdiscord.nixandslack.nix:IMPORTANT: However, since
programs.ewmoptions come from the EWM nixosModule itself (imported at the flake level), this wrapper module should NOT redefineprograms.ewm.enable. Instead, the enable flag should be set directly in themkNixosSystemblock inflake.nix(where slack and discord enables are set). So actually, we do NOT need a separatemodules/nixos/programs/ewm.nix— just setprograms.ewm.enabledirectly in the flake like the other programs.So the correct approach is: in
flake.nix, in the module block where we have:Just add:
Do NOT create
modules/nixos/programs/ewm.nix— it would conflict with the options defined by EWM's own nixosModule.3.
hosts/common/core/default.nix— Update greetd to support session switchingCurrently line 50 is:
Change it to:
Wait — actually the EWM NixOS module (service.nix) registers a session with the display manager automatically. With
tuigreet, the--sessionsflag isn't strictly needed if EWM registers a.desktopfile in the right place. The better approach is to use--sessionspointing to the standard wayland-sessions directory so tuigreet can discover all registered sessions:Actually, the simplest and most standard approach: just add
--sessionsso tuigreet picks up desktop files from the standard session paths. Since we don't know the exact path the EWM module uses, the safest change is:But on NixOS the sessions are in the Nix store. The cleanest NixOS way is:
Actually, keep the greetd command as-...
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.