nixos/system/optional/desktop.nix
2025-12-04 15:49:10 +01:00

36 lines
756 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 = {
default_session = {
user = "lilith";
command = "Hyprland";
};
initial_session = {
user = "lilith";
command = "Hyprland";
};
};
};
};
}