From 720bd2f391f2221132c15e4a76b6a40175c2da02 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Wed, 27 Aug 2025 22:50:07 +0200 Subject: [PATCH] fix(desktop): fix xdg-wlr file creation --- modules/home-manager/desktop/sway/default.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/home-manager/desktop/sway/default.nix b/modules/home-manager/desktop/sway/default.nix index 643e192..4f53efa 100644 --- a/modules/home-manager/desktop/sway/default.nix +++ b/modules/home-manager/desktop/sway/default.nix @@ -197,15 +197,17 @@ in }; }; }; - + # When using `useDistributionPackage`, create wlr configuration to let user # choose the right screen. This is a workarount to not have to configure # it manually. - home.file."${config.xdg.configHome}/xdg-desktop-portal-wlr/config".text = mkIf cfg.xdg.useDistributionPortals '' - [screencast] - max_fps=30 - chooser_type=simple - chooser_cmd=${pkgs.slurp}/bin/slurp -f %o -or - ''; + home.file = mkIf cfg.xdg.useDistributionPortals { + "${config.xdg.configHome}/xdg-desktop-portal-wlr/config".text = '' + [screencast] + max_fps=30 + chooser_type=simple + chooser_cmd=${pkgs.slurp}/bin/slurp -f %o -or + ''; + }; }; }