diff --git a/nixos/modules/programs/wayland/hyprland.nix b/nixos/modules/programs/wayland/hyprland.nix index f5ca741f9432..98779ea7d03a 100644 --- a/nixos/modules/programs/wayland/hyprland.nix +++ b/nixos/modules/programs/wayland/hyprland.nix @@ -69,7 +69,8 @@ in (import ./wayland-session.nix { inherit lib pkgs; - xwayland = cfg.xwayland.enable; + enableXWayland = cfg.xwayland.enable; + enableWlrPortal = false; # Hyprland has its own portal, wlr is not needed }) ]); @@ -87,4 +88,6 @@ in "Nvidia patches are no longer needed" ) ]; + + meta.maintainers = with lib.maintainers; [ fufexan ]; } diff --git a/nixos/modules/programs/wayland/river.nix b/nixos/modules/programs/wayland/river.nix index 0980bd28cf82..6391f00e2f62 100644 --- a/nixos/modules/programs/wayland/river.nix +++ b/nixos/modules/programs/wayland/river.nix @@ -57,7 +57,7 @@ in (import ./wayland-session.nix { inherit lib pkgs; - xwayland = cfg.xwayland.enable; + enableXWayland = cfg.xwayland.enable; }) ]); diff --git a/nixos/modules/programs/wayland/sway.nix b/nixos/modules/programs/wayland/sway.nix index 31821a84a5bd..e3e32aa7a56a 100644 --- a/nixos/modules/programs/wayland/sway.nix +++ b/nixos/modules/programs/wayland/sway.nix @@ -140,7 +140,7 @@ in (import ./wayland-session.nix { inherit lib pkgs; - xwayland = cfg.xwayland.enable; + enableXWayland = cfg.xwayland.enable; }) ]); diff --git a/nixos/modules/programs/wayland/wayland-session.nix b/nixos/modules/programs/wayland/wayland-session.nix index e9c12da156ab..877b10668470 100644 --- a/nixos/modules/programs/wayland/wayland-session.nix +++ b/nixos/modules/programs/wayland/wayland-session.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, xwayland ? true }: +{ + lib, + pkgs, + enableXWayland ? true, + enableWlrPortal ? true, +}: { security = { @@ -11,8 +16,12 @@ programs = { dconf.enable = lib.mkDefault true; - xwayland.enable = lib.mkDefault xwayland; + xwayland.enable = lib.mkDefault enableXWayland; }; - xdg.portal.wlr.enable = lib.mkDefault true; + xdg.portal.wlr.enable = enableWlrPortal; + + # Window manager only sessions (unlike DEs) don't handle XDG + # autostart files, so force them to run the service + services.xserver.desktopManager.runXdgAutostartIfNone = lib.mkDefault true; }