From e727f258047271c9200c0344ebb43c4fe0288110 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Fri, 28 Feb 2025 05:13:20 +0800 Subject: [PATCH] refactor(hyprland): move hyprland into its own module --- modules/home-wm.nix | 27 +++++++++++++++++++++++++++ users/rafiq/default.nix | 27 +-------------------------- 2 files changed, 28 insertions(+), 26 deletions(-) create mode 100644 modules/home-wm.nix diff --git a/modules/home-wm.nix b/modules/home-wm.nix new file mode 100644 index 0000000..edd4b4b --- /dev/null +++ b/modules/home-wm.nix @@ -0,0 +1,27 @@ +{ + wayland.windowManager.hyprland = { + enable = true; + systemd.enable = false; # Required for UWSM compat + systemd.variables = ["--all"]; + # Use tha packages defined in the system configuration + package = null; + portalPackage = null; + settings = { + monitor = [ + "HDMI-A-2, 3840x2160@60, 0x0, 2" + "DP-4, 1920x1080@60, -1920x0, 1" + ", preferred, auto, 1" + ]; + "$terminal" = "kitty"; + "$browser" = "firefox"; + "$mainMod" = "SUPER"; + bind = [ + "$mainMod, Q, exec, uwsm app -- $terminal" + "$mainMod, W, killactive" + "$mainMod, E, exec, uwsm app -- $browser" + "$mainMod, M, exec, uwsm stop" + ]; + debug.disable_logs = false; + }; + }; +} diff --git a/users/rafiq/default.nix b/users/rafiq/default.nix index 76e9e25..d446985 100644 --- a/users/rafiq/default.nix +++ b/users/rafiq/default.nix @@ -5,6 +5,7 @@ ../../modules/home-git.nix ../../modules/home-tmux.nix ../../modules/home-sh.nix + ../../modules/home-wm.nix ]; home = { @@ -28,32 +29,6 @@ home-manager.enable = true; }; - wayland.windowManager.hyprland = { - enable = true; - systemd.enable = false; # Required for UWSM compat - systemd.variables = ["--all"]; - # Use tha packages defined in the system configuration - package = null; - portalPackage = null; - settings = { - monitor = [ - "HDMI-A-2, 3840x2160@60, 0x0, 2" - "DP-4, 1920x1080@60, -1920x0, 1" - ", preferred, auto, 1" - ]; - "$terminal" = "kitty"; - "$browser" = "firefox"; - "$mainMod" = "SUPER"; - bind = [ - "$mainMod, Q, exec, uwsm app -- $terminal" - "$mainMod, W, killactive" - "$mainMod, E, exec, uwsm app -- $browser" - "$mainMod, M, exec, uwsm stop" - ]; - debug.disable_logs = false; - }; - }; - services = { cliphist.enable = true; };