From 4d3330d4f3887a8dffd0f664395900d977a38e45 Mon Sep 17 00:00:00 2001 From: Joshua Yuen Date: Sat, 26 Jul 2025 03:34:37 -0400 Subject: [PATCH] Improve hyprland option handling --- modules/home/hyprland/hyprland.nix | 48 +++++++++++++----------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/modules/home/hyprland/hyprland.nix b/modules/home/hyprland/hyprland.nix index 224b1eb..e410901 100644 --- a/modules/home/hyprland/hyprland.nix +++ b/modules/home/hyprland/hyprland.nix @@ -11,38 +11,32 @@ let cfg = osConfig.modules.hyprland; in { - config = mkIf cfg.enable { - home.packages = with pkgs; [ - kitty - ]; + systemd.user.targets.hyprland-session.Unit.Wants = [ + "xdg-desktop-autostart.target" + ]; - systemd.user.targets.hyprland-session.Unit.Wants = [ - "xdg-desktop-autostart.target" - ]; - - wayland.windowManager.hyprland = { + wayland.windowManager.hyprland = { + enable = cfg.enable; + package = pkgs.hyprland; + systemd = { enable = true; - package = pkgs.hyprland; - systemd = { - enable = true; - enableXdgAutostart = true; + enableXdgAutostart = true; + }; + xwayland.enable = true; + settings = { + general = { + "$modifier" = "SUPER"; }; - xwayland.enable = true; - settings = { - general = { - "$modifier" = "SUPER"; - }; - env = [ - "NIXOS_OZONE_WL, 1" - "XDG_CURRENT_DESKTOP, Hyprland" - "XDG_SESSION_DESKTOP, Hyprland" - "XDG_SESSION_TYPE, wayland" - ]; + env = [ + "NIXOS_OZONE_WL, 1" + "XDG_CURRENT_DESKTOP, Hyprland" + "XDG_SESSION_DESKTOP, Hyprland" + "XDG_SESSION_TYPE, wayland" + ]; - ecosystem = { - no_update_news = true; - }; + ecosystem = { + no_update_news = true; }; }; };