# Hyprland under uwsm, logging in on tty1, audio, Bluetooth, fonts and the # system side of theming. { pkgs, ... }: { programs.hyprland = { enable = true; # uwsm starts Hyprland as a systemd unit and brings up # graphical-session.target, which the user services in # modules/home/services.nix hang off. withUWSM = true; }; programs.hyprlock.enable = true; xdg.portal = { enable = true; # File pickers and settings for GTK apps; screen sharing comes from # xdg-desktop-portal-hyprland, which programs.hyprland adds. extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; }; # --- Login -------------------------------------------------------------------- # No display manager: tty1 logs you in automatically and its login shell starts # Hyprland. The session comes up locked, though: hyprlock runs first and the # rest of the desktop (graphical-session.target) waits until it is unlocked; # see login-lock in modules/home/desktop.nix. services.getty.autologinUser = "vizie"; # In /etc/profile and /etc/zprofile, after the session variables. The tty test # comes first so that uwsm's environment preloader, which reads the profile # too, skips this without running uwsm. The VT is briefly visible before # Hyprland takes over the screen, so clear it, hide the text cursor, and keep # uwsm's startup report off it; Hyprland logs to the journal. environment.loginShellInit = '' if [ "$(tty)" = /dev/tty1 ] && uwsm check may-start -q; then printf '\033[2J\033[3J\033[H\033[?25l' exec uwsm start hyprland-uwsm.desktop >/dev/null 2>&1 fi ''; # Home Manager's dconf.settings (theming.nix, services.nix) need it. programs.dconf.enable = true; # --- Audio, Bluetooth, devices -------------------------------------------------- services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; jack.enable = true; }; services.pulseaudio.enable = false; hardware.bluetooth = { enable = true; powerOnBoot = true; }; services.blueman.enable = true; services.upower.enable = true; services.udisks2.enable = true; services.gvfs.enable = true; security.polkit.enable = true; # Secret Service (what Electron apps and libsecret store passwords in) from # KWallet's ksecretd, started on demand over D-Bus, as on CachyOS. Not GNOME # Keyring: it would claim the same D-Bus name. services.dbus.packages = [ pkgs.kdePackages.kwallet ]; # Battery of the Logitech mouse in the control centre (mouse-battery.sh). hardware.logitech.wireless.enable = true; # --- Fonts ------------------------------------------------------------------- # The fonts installed on CachyOS. kitty's config asks for JetBrains Mono, which # was never installed there, so kitty has been using Noto Sans Mono; add # nerd-fonts.jetbrains-mono here to get the font the config names. fonts.packages = with pkgs; [ noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji nerd-fonts.noto nerd-fonts.meslo-lg nerd-fonts.fantasque-sans-mono dejavu_fonts liberation_ttf ttf-bitstream-vera open-sans cantarell-fonts adwaita-fonts font-awesome wqy_zenhei ]; # --- Theming (system side) ------------------------------------------------------ # Qt apps use qt6ct + Kvantum (set up by Home Manager, modules/home/theming.nix). qt = { enable = true; platformTheme = "qt5ct"; style = "kvantum"; }; environment.systemPackages = with pkgs; [ breezex-cursor papirus-icon-theme kdePackages.breeze-icons gnome-themes-extra adwaita-icon-theme kdePackages.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum qt6Packages.qt6ct ]; }