# Hyprland session: UWSM-managed compositor, greetd login, portals, keyring and # the small system services a desktop needs. Noctalia, audio and fonts are # separate files gated on the same option. { config, lib, pkgs, ... }: let cfg = config.my.desktop.hyprland; in { options.my.desktop.hyprland.enable = lib.mkEnableOption "the Hyprland desktop session"; config = lib.mkIf cfg.enable { # package/portalPackage stay default: the overlay swaps in the flake builds. programs.hyprland = { enable = true; withUWSM = true; xwayland.enable = true; }; services.greetd = { enable = true; # Keeps boot messages from drawing over the greeter. useTextGreeter = true; settings.default_session = { command = lib.concatStringsSep " " [ (lib.getExe pkgs.tuigreet) "--time" "--remember" "--remember-user-session" "--asterisks" "--sessions ${config.services.displayManager.sessionData.desktops}/share/wayland-sessions" ]; user = "greeter"; }; }; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; security.polkit.enable = true; services.gnome.gnome-keyring.enable = true; security.pam.services.greetd.enableGnomeKeyring = true; programs.dconf.enable = true; # Electron/Chromium apps use native Wayland. environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Removable drives and trash/mounts in the file manager. services.udisks2.enable = true; services.gvfs.enable = true; hardware.bluetooth = { enable = true; powerOnBoot = true; }; environment.systemPackages = with pkgs; [ wl-clipboard cliphist grim slurp brightnessctl playerctl pavucontrol nautilus hyprpicker ]; }; }