Merge pull request #315827 from JohnRTitor/hyprland-module

nixos/{hyprland, wayland-common}: disable wlr portal for hyprland, enable xdg autostart for all wayland compositors
This commit is contained in:
Jörg Thalheim 2024-06-05 09:57:53 +02:00 committed by GitHub
commit 7d98bbfcd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 6 deletions

View File

@ -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 ];
}

View File

@ -57,7 +57,7 @@ in
(import ./wayland-session.nix {
inherit lib pkgs;
xwayland = cfg.xwayland.enable;
enableXWayland = cfg.xwayland.enable;
})
]);

View File

@ -140,7 +140,7 @@ in
(import ./wayland-session.nix {
inherit lib pkgs;
xwayland = cfg.xwayland.enable;
enableXWayland = cfg.xwayland.enable;
})
]);

View File

@ -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;
}