From 85d4610988ff720516a68a937fa8b07d34868253 Mon Sep 17 00:00:00 2001 From: voidarc Date: Tue, 25 Aug 2026 20:19:18 +0100 Subject: [PATCH] plugins loading in hyprland according to toggle --- flake.lock | 8 ++++---- modules/features/hyprland/default.nix | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index cac40e0..49921f6 100644 --- a/flake.lock +++ b/flake.lock @@ -374,11 +374,11 @@ "wshowkeys": "wshowkeys" }, "locked": { - "lastModified": 1787681733, - "narHash": "sha256-+KuqE3sLF/rSO9QU3ByxPVYhkl3WH9rPOIvZZARK2LM=", + "lastModified": 1787685448, + "narHash": "sha256-gvdmxEM49ZE6KqosyKIHsQ6V6NHcYrw9in2TpuFad4I=", "ref": "refs/heads/main", - "rev": "31e7c1ccb7b6a0cb396fa57846232ab8c5bd7e81", - "revCount": 65, + "rev": "0c27e34df40ba4865cb8d9838b80685fc3b79785", + "revCount": 69, "type": "git", "url": "https://git.voidarc.co.uk/voidarc/hypr" }, diff --git a/modules/features/hyprland/default.nix b/modules/features/hyprland/default.nix index b9a1be5..0951dce 100644 --- a/modules/features/hyprland/default.nix +++ b/modules/features/hyprland/default.nix @@ -56,10 +56,11 @@ ''; system.activationScripts.hyprConfig = let - pluginFile = builtins.toFile "plugins.lua" '' + hyprgrassPath = "${inputs'.hyprgrass.packages.default}/lib/libhyprgrass.so"; + pluginFile = pkgs.writeText "plugins.lua" '' hl.on("hyprland.start", function () ${lib.optionalString config.hyprland.enablePlugins '' - hl.exec("hyprctl plugin load ${inputs'.hyprgrass.packages.default}/lib/libhyprgrass.so") + hl.exec_cmd("hyprctl plugin load ${hyprgrassPath}") ''} end) ''; @@ -82,6 +83,7 @@ hyprland = inputs'.hyprland.packages.default.override { flags."--config" = "/run/hypr/config/hyprland.lua"; env."MODULES_ROOT" = "/run/hypr/config/modules"; + env."HYPRLAND_ROOT" = "/run/hypr/config"; runtimePackages = inputs.hyprland.lib.defaultRuntimePkgs.${system} // {