diff --git a/nixos/modules/programs/wayland/cardboard.nix b/nixos/modules/programs/wayland/cardboard.nix index 5a25b5359c24..96089bdf94ed 100644 --- a/nixos/modules/programs/wayland/cardboard.nix +++ b/nixos/modules/programs/wayland/cardboard.nix @@ -19,6 +19,6 @@ in # To make a cardboard session available for certain DMs like SDDM services.displayManager.sessionPackages = [ cfg.package ]; } - (import ./wayland-session.nix { inherit lib; }) + (import ./wayland-session.nix { inherit lib pkgs; }) ]); } diff --git a/nixos/modules/programs/wayland/hyprland.nix b/nixos/modules/programs/wayland/hyprland.nix index f8b70af40600..6e69c1730e57 100644 --- a/nixos/modules/programs/wayland/hyprland.nix +++ b/nixos/modules/programs/wayland/hyprland.nix @@ -70,7 +70,7 @@ in } (import ./wayland-session.nix { - inherit lib; + inherit lib pkgs; enableXWayland = cfg.xwayland.enable; enableWlrPortal = lib.mkDefault false; # Hyprland has its own portal, wlr is not needed }) diff --git a/nixos/modules/programs/wayland/labwc.nix b/nixos/modules/programs/wayland/labwc.nix index 4c74b45bb4a3..c09ab8240d9f 100644 --- a/nixos/modules/programs/wayland/labwc.nix +++ b/nixos/modules/programs/wayland/labwc.nix @@ -20,6 +20,6 @@ in # To make a labwc session available for certain DMs like SDDM services.displayManager.sessionPackages = [ cfg.package ]; } - (import ./wayland-session.nix { inherit lib; }) + (import ./wayland-session.nix { inherit lib pkgs; }) ]); } diff --git a/nixos/modules/programs/wayland/miracle-wm.nix b/nixos/modules/programs/wayland/miracle-wm.nix index e20b62acb462..3cee538c8997 100644 --- a/nixos/modules/programs/wayland/miracle-wm.nix +++ b/nixos/modules/programs/wayland/miracle-wm.nix @@ -30,11 +30,12 @@ in } (import ./wayland-session.nix { - inherit lib; + inherit lib pkgs; # Hardcoded path in Mir, not really possible to disable enableXWayland = true; # No portal support yet: https://github.com/mattkae/miracle-wm/issues/164 enableWlrPortal = false; + enableGtkPortal = false; }) ] ); diff --git a/nixos/modules/programs/wayland/river.nix b/nixos/modules/programs/wayland/river.nix index da793a9ff344..6391f00e2f62 100644 --- a/nixos/modules/programs/wayland/river.nix +++ b/nixos/modules/programs/wayland/river.nix @@ -56,7 +56,7 @@ in } (import ./wayland-session.nix { - inherit lib; + inherit lib pkgs; enableXWayland = cfg.xwayland.enable; }) ]); diff --git a/nixos/modules/programs/wayland/sway.nix b/nixos/modules/programs/wayland/sway.nix index 27c32ce42dc5..7c5f49ce6d79 100644 --- a/nixos/modules/programs/wayland/sway.nix +++ b/nixos/modules/programs/wayland/sway.nix @@ -148,7 +148,7 @@ in } (import ./wayland-session.nix { - inherit lib; + inherit lib pkgs; enableXWayland = cfg.xwayland.enable; }) ]); diff --git a/nixos/modules/programs/wayland/wayfire.nix b/nixos/modules/programs/wayland/wayfire.nix index 726300ce5381..1c3950bff47d 100644 --- a/nixos/modules/programs/wayland/wayfire.nix +++ b/nixos/modules/programs/wayland/wayfire.nix @@ -63,7 +63,7 @@ in }; } (import ./wayland-session.nix { - inherit lib; + inherit lib pkgs; enableXWayland = cfg.xwayland.enable; }) ] diff --git a/nixos/modules/programs/wayland/wayland-session.nix b/nixos/modules/programs/wayland/wayland-session.nix index b3d6cc368b20..1f5dc413d377 100644 --- a/nixos/modules/programs/wayland/wayland-session.nix +++ b/nixos/modules/programs/wayland/wayland-session.nix @@ -1,7 +1,9 @@ { lib, + pkgs, enableXWayland ? true, enableWlrPortal ? true, + enableGtkPortal ? true, }: { @@ -18,6 +20,9 @@ services.graphical-desktop.enable = true; xdg.portal.wlr.enable = enableWlrPortal; + xdg.portal.extraPortals = lib.mkIf enableGtkPortal [ + pkgs.xdg-desktop-portal-gtk + ]; # Window manager only sessions (unlike DEs) don't handle XDG # autostart files, so force them to run the service