nixos/system/optional/desktop.nix
2026-01-06 18:47:49 +01:00

33 lines
711 B
Nix

{
config,
lib,
pkgs,
hyprland,
...
}:
{
options.desktop.enable = lib.mkEnableOption "Enable Wayland compositor with hyprland login";
config = lib.mkIf config.desktop.enable {
hardware.graphics.enable = true;
security.polkit.enable = true;
security.pam.services.hyprlock = { };
services.dbus.enable = true;
programs.hyprland.enable = true;
programs.hyprland.package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
services.greetd = {
enable = true;
settings = rec {
default_session = {
user = "lilith";
command = "start-hyprland";
};
initial_session = default_session;
};
};
};
}