From 1a3b92b9e395bd64c27cd8c5b4ce500599b5ce3d Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Mon, 21 Sep 2026 03:33:31 +0500 Subject: [PATCH] fix screenshare, idk how this broke it worked fine with old configure before update switching to home manger and flakes --- hosts/la2410/configuration.nix | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/hosts/la2410/configuration.nix b/hosts/la2410/configuration.nix index 2741883..9e50265 100644 --- a/hosts/la2410/configuration.nix +++ b/hosts/la2410/configuration.nix @@ -231,6 +231,27 @@ security.doas.extraRules = [ # grim # ]; }; + # Screen sharing on sway (browsers, OBS). + xdg.portal = { + enable = true; + # Without chooser_type=simple, xdpw hunts for wmenu/rofi/bemenu/fuzzel/wofi, + # finds none, and every screencast fails with "no output found". slurp needs + # an absolute path -- the user service runs with a minimal PATH. + wlr = { + enable = true; + settings.screencast = { + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; + }; + }; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + config.common = { + default = [ "wlr" "gtk" ]; + "org.freedesktop.impl.portal.ScreenCast" = [ "wlr" ]; + "org.freedesktop.impl.portal.Screenshot" = [ "wlr" ]; + }; + }; + programs.waybar.enable = true; programs.xfconf.enable = true; @@ -277,7 +298,7 @@ services.displayManager.ly = { # Open ports in the firewall. # 5173 = Vite dev server, 8000 = Django backend (sarlinkportal LAN access) - networking.firewall.allowedTCPPorts = [ 5173 8000 80 ]; + networking.firewall.allowedTCPPorts = [ 22 ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false;