depot/third_party/nixpkgs/nixos/modules/programs/wayland/wayland-session.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

27 lines
606 B
Nix

{
lib,
pkgs,
enableXWayland ? true,
enableWlrPortal ? true,
}:
{
security = {
polkit.enable = true;
pam.services.swaylock = {};
};
hardware.opengl.enable = lib.mkDefault true;
fonts.enableDefaultPackages = lib.mkDefault true;
programs = {
dconf.enable = lib.mkDefault true;
xwayland.enable = lib.mkDefault enableXWayland;
};
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;
}