From b496e2c71817aae5560af04b8c6439c39f4e05d8 Mon Sep 17 00:00:00 2001 From: Amadej Kastelic Date: Thu, 3 Apr 2025 09:43:06 +0200 Subject: [PATCH] nix/module: load plugins using exec-once (#9836) --- nix/module.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nix/module.nix b/nix/module.nix index 0b8c4f420..10a8c97c1 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -126,13 +126,14 @@ in { bottomCommandsPrefixes = cfg.bottomPrefixes; } { - plugin = let + "exec-once" = let mkEntry = entry: if lib.types.package.check entry then "${entry}/lib/lib${entry.pname}.so" else entry; + hyprctl = lib.getExe' config.programs.hyprland.package "hyprctl"; in - map mkEntry cfg.plugins; + map (p: "${hyprctl} plugin load ${mkEntry p}") cfg.plugins; }; in lib.mkIf shouldGenerate {