1
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2025-07-28 18:51:54 -07:00

nix/module: load plugins using exec-once ()

This commit is contained in:
Amadej Kastelic
2025-04-03 09:43:06 +02:00
committed by GitHub
parent a41b8d5e97
commit b496e2c718

@@ -126,13 +126,14 @@ in {
bottomCommandsPrefixes = cfg.bottomPrefixes; bottomCommandsPrefixes = cfg.bottomPrefixes;
} }
{ {
plugin = let "exec-once" = let
mkEntry = entry: mkEntry = entry:
if lib.types.package.check entry if lib.types.package.check entry
then "${entry}/lib/lib${entry.pname}.so" then "${entry}/lib/lib${entry.pname}.so"
else entry; else entry;
hyprctl = lib.getExe' config.programs.hyprland.package "hyprctl";
in in
map mkEntry cfg.plugins; map (p: "${hyprctl} plugin load ${mkEntry p}") cfg.plugins;
}; };
in in
lib.mkIf shouldGenerate { lib.mkIf shouldGenerate {