depot/third_party/nixpkgs/nixos/modules/programs/wayland/wayland-session.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

30 lines
669 B
Nix

{
lib,
pkgs,
enableXWayland ? true,
enableWlrPortal ? true,
enableGtkPortal ? true,
}:
{
security = {
polkit.enable = true;
pam.services.swaylock = {};
};
programs = {
dconf.enable = lib.mkDefault true;
xwayland.enable = lib.mkDefault enableXWayland;
};
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
services.xserver.desktopManager.runXdgAutostartIfNone = lib.mkDefault true;
}