diff --git a/system/modules/desktopportal/default.nix b/system/modules/desktopportal/default.nix index 86fc9072..6780d959 100644 --- a/system/modules/desktopportal/default.nix +++ b/system/modules/desktopportal/default.nix @@ -14,7 +14,7 @@ in { portal = { enable = true; xdgOpenUsePortal = true; - wlr.enable = false; + wlr.enable = true; # TODO: Replace lib.optional(s) throughout the config with mkMerge config = lib.mkMerge [ @@ -35,6 +35,14 @@ in { (desktopportal.hyprland.enable && desktopportal.termfilechooser.enable) { hyprland."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"]; }) + + (lib.mkIf desktopportal.niri.enable { + niri.default = ["gtk" "gnome"]; + }) + + (lib.mkIf (desktopportal.niri.enable && desktopportal.termfilechooser.enable) { + niri."org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"]; + }) ]; extraPortals = with pkgs; diff --git a/system/modules/desktopportal/options.nix b/system/modules/desktopportal/options.nix index 14cee219..8f0589cd 100644 --- a/system/modules/desktopportal/options.nix +++ b/system/modules/desktopportal/options.nix @@ -6,4 +6,5 @@ enable = lib.mkEnableOption "Enable XDG desktop portals"; termfilechooser.enable = lib.mkEnableOption "Enable xdg-desktop-portal-termfilechooser"; hyprland.enable = lib.mkEnableOption "Configure portals for Hyprland"; + niri.enable = lib.mkEnableOption "Configure portals for Niri"; }