Add seatd.

This commit is contained in:
Tom Alexander
2025-01-14 21:10:03 -05:00
parent 5a5839482d
commit 491412c33c
3 changed files with 8 additions and 3 deletions

View File

@@ -6,6 +6,7 @@
}:
let
# TODO: Maybe replace wofi with tofi (with config to make it start quickly)
sway-config = pkgs.writeTextFile {
name = "config";
text = ''
@@ -228,8 +229,8 @@ let
name = "announce_sway_start.conf";
text = ''
# announce a running sway session to systemd
exec systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
exec systemctl --user import-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP SWAYSOCK I3SOCK XCURSOR_SIZE XCURSOR_THEME
exec dbus-update-activation-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP SWAYSOCK I3SOCK XCURSOR_SIZE XCURSOR_THEME
'';
};
@@ -289,6 +290,9 @@ in
announce_sway_start
];
services.seatd.enable = true;
users.users.talexander.extraGroups = [ "seat" ];
# Probably would be cleaner to use environment.sessionVariables but programs.sway.extraSessionCommands is sway-specific.
programs.sway.extraSessionCommands =
if config.me.buildingIso then