depot/third_party/nixpkgs/nixos/modules/programs/wayland/wayland-session.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

27 lines
608 B
Nix

{
lib,
pkgs,
enableXWayland ? true,
enableWlrPortal ? true,
}:
{
security = {
polkit.enable = true;
pam.services.swaylock = {};
};
hardware.graphics.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;
}