1
0
Fork 0
mirror of https://github.com/hyprwm/Hyprland synced 2025-04-10 23:52:22 +02: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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {