nixos/wayland: add gtk portal to all applicable compositors (#342646)

This commit is contained in:
Masum Reza 2024-10-01 00:23:28 +05:30 committed by GitHub
commit afab97c863
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 13 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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