{ config, pkgs, lib, inputs, ... }: { services = { xserver = { xkb = { layout = builtins.substring 0 2 config.system.locale; variant = ""; }; }; power-profiles-daemon = { enable = true; }; upower = { enable = true; }; displayManager = { gdm = { enable = true; autoSuspend = false; }; }; }; programs = { uwsm = { enable = true; waylandCompositors = if config.desktop.window-managers.hyprland.enable then { hyprland = { prettyName = "Hyprland"; comment = "Hyprland"; binPath = "${config.programs.hyprland.package}/bin/start-hyprland"; }; } else if config.desktop.window-managers.sway.enable then { sway = { prettyName = "Sway"; comment = "Sway"; binPath = "${config.programs.sway.package}/bin/sway --session"; }; } else if config.desktop.window-managers.niri.enable then { niri = { prettyName = "Niri"; comment = "Niri"; binPath = "${config.programs.niri.package}/bin/niri-session"; }; } else { }; }; }; xdg.portal.enable = true; }