From ba18c4944b2a655689d4b55f6c662b8ee40588cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 23 Sep 2022 21:25:05 -0300 Subject: [PATCH] sway: fix systemd variables --- user/sway.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/user/sway.nix b/user/sway.nix index d29eb4d..cabf4ff 100644 --- a/user/sway.nix +++ b/user/sway.nix @@ -38,6 +38,16 @@ let systemctl --user start swayidle.service fi ''; + dbus-sway-environment = pkgs.writeTextFile { + name = "dbus-sway-environment"; + destination = "/bin/dbus-sway-environment"; + executable = true; + text = '' + 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 + ''; + }; in { config = { wayland.windowManager.sway = let @@ -311,6 +321,7 @@ in { }; extraConfig = '' for_window [title=.*] inhibit_idle fullscreen + exec ${dbus-sway-environment}/bin/dbus-sway-environment ''; }; services.swayidle = {