# modules/features/desktop/hyprland.nix — the NixOS side of the Hyprland # desktop, on when daemon.desktop.hyprland.enable (modules/features/desktop/options.nix). # The compositor config, Caelestia and the session services are home-manager # modules (modules/home/hyprland.nix, modules/home/caelestia.nix), gated the same way. { ... }: { flake.nixosModules.desktop-hyprland = { config, lib, pkgs, inputs, ... }: { # Hyprland package and portal come from inputs.hyprland.nixosModules.default. imports = [ inputs.hyprland.nixosModules.default ]; config = lib.mkIf config.daemon.desktop.hyprland.enable { programs.hyprland = { enable = true; withUWSM = true; # systemd-managed session; graphical-session.target starts Caelestia, polkit agent, udiskie xwayland.enable = true; }; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; # file chooser; hyprland portal does screencast }; } ; }