From 3db0b87a09016ba9ce0b9c3e0571f2bc85daaa41 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 3 May 2025 16:15:57 +1000 Subject: [PATCH] nix: add hyprland module --- nix/modules/hyprland.nix | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 nix/modules/hyprland.nix diff --git a/nix/modules/hyprland.nix b/nix/modules/hyprland.nix new file mode 100644 index 0000000..edf1454 --- /dev/null +++ b/nix/modules/hyprland.nix @@ -0,0 +1,45 @@ +{ config, lib, pkgs }: + +{ + programs.hyprland.enable = true; + # Optional, hint electron apps to use wayland: + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + + # have portals + xdg.portal.enable = true; + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + + # install basic fonts + fonts = { + fontDir.enable = true; # fixes some programs + packages = with pkgs; [ + noto-fonts # most langs and emojis + nerdfonts # programming fonts + corefonts # basic web fonts + ]; + }; + + programs.hyprlock.enable = true; + + # Enable sound. + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + environment.systemPackages = with pkgs; [ + kitty + waybar + swww + grim + slurp + wl-clipboard + brightnessctl + helvum + ulauncher + ]; +}