config.nix/modules/desktop/display-manager.nix
2026-03-30 22:03:03 +02:00

51 lines
1.1 KiB
Nix

{
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 = {
waylandCompositors = {
hyprland = lib.mkIf config.desktop.window-managers.hyprland.enable {
prettyName = "Hyprland";
comment = "Hyprland";
binPath = "${config.programs.hyprland.package}/bin/start-hyprland";
};
sway = lib.mkIf config.desktop.window-managers.sway.enable {
prettyName = "Sway";
comment = "Sway";
binPath = "${config.programs.sway.package}/bin/sway --session";
};
niri = lib.mkIf config.desktop.window-managers.niri.enable {
prettyName = "Niri";
comment = "Niri";
binPath = "${config.programs.niri.package}/bin/niri-session";
};
};
};
};
}