From cd15722fa9a10b05f7ae0e08b7169dcce18f9ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Wed, 13 Mar 2024 21:58:53 +0100 Subject: [PATCH] 215 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * --- modules/nixos/greetd.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/modules/nixos/greetd.nix b/modules/nixos/greetd.nix index bf304ad..5e75d06 100644 --- a/modules/nixos/greetd.nix +++ b/modules/nixos/greetd.nix @@ -4,6 +4,21 @@ pkgs, ... }: let + # bash script to let dbus know about impotant env variables and + # propagate them to relevent services run at the end of sway config + dbus-sway-environment = pkgs.writeShellScriptBin "dubs-sway-environment" '' + dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr + systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr + ''; + + # currently, there is some friction between sway and gtk: + # https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland + configure-gtk = pkgs.writeShellScriptBin "configure-gtk" '' + gnome_schema=org.gnome.desktop.interface + gsettings set $gnome_schema gtk-theme 'Dracula' + ''; + swayConfig = pkgs.writeText "greetd-sway-config" '' input * { xkb_layout "de" @@ -15,8 +30,8 @@ natural_scroll "enable" } - exec dbus-sway-environment - exec configure-gtk + exec ${dbus-sway-environment}/bin/dbus-sway-environment + exec ${configure-gtk}/bin/configure-gtk # `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet. exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit" bindsym Mod4+shift+e exec swaynag \