From 491412c33c5b9bd173e856a6c155aabdd7fc7949 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Tue, 14 Jan 2025 21:10:03 -0500 Subject: [PATCH] Add seatd. --- nix/configuration/roles/kanshi/default.nix | 1 + nix/configuration/roles/media/default.nix | 2 +- nix/configuration/roles/sway/default.nix | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nix/configuration/roles/kanshi/default.nix b/nix/configuration/roles/kanshi/default.nix index 5022fdd..140833a 100644 --- a/nix/configuration/roles/kanshi/default.nix +++ b/nix/configuration/roles/kanshi/default.nix @@ -1,3 +1,4 @@ +# TODO: Maybe replace with https://gitlab.com/w0lff/shikane because its written in rust { config, lib, diff --git a/nix/configuration/roles/media/default.nix b/nix/configuration/roles/media/default.nix index f258b61..ed00375 100644 --- a/nix/configuration/roles/media/default.nix +++ b/nix/configuration/roles/media/default.nix @@ -61,7 +61,7 @@ in mpv evince gimp - imv + imv # TODO: Maybe replace with https://github.com/artemsen/swayimg because imv is looking for a new maintainer ]; }) (lib.mkIf (config.me.graphicsCardType == "amd" || config.me.graphicsCardType == "intel") { diff --git a/nix/configuration/roles/sway/default.nix b/nix/configuration/roles/sway/default.nix index 1b3b8ba..9374f5b 100644 --- a/nix/configuration/roles/sway/default.nix +++ b/nix/configuration/roles/sway/default.nix @@ -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