diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index 5d0eb3558..b8543afca 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -287,12 +287,13 @@ in plugins: lib.hm.generators.toHyprconf { attrs = { - plugin = + "exec-once" = let mkEntry = entry: if lib.types.package.check entry then "${entry}/lib/lib${entry.pname}.so" else entry; + hyprctl = "${cfg.finalPackage}/bin/hyprctl"; in - map mkEntry cfg.plugins; + map (p: "${hyprctl} plugin load ${mkEntry p}") cfg.plugins; }; inherit (cfg) importantPrefixes; }; diff --git a/tests/modules/services/window-managers/hyprland/multiple-devices-config.conf b/tests/modules/services/window-managers/hyprland/multiple-devices-config.conf index d0e82572d..f0b1780bd 100644 --- a/tests/modules/services/window-managers/hyprland/multiple-devices-config.conf +++ b/tests/modules/services/window-managers/hyprland/multiple-devices-config.conf @@ -1,6 +1,6 @@ exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target -plugin=/path/to/plugin1 -plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so +exec-once=/nix/store/00000000000000000000000000000000-hyprland/bin/hyprctl plugin load /path/to/plugin1 +exec-once=/nix/store/00000000000000000000000000000000-hyprland/bin/hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so $mod=SUPER bezier=smoothOut, 0.36, 0, 0.66, -0.56 bezier=smoothIn, 0.25, 1, 0.5, 1 diff --git a/tests/modules/services/window-managers/hyprland/simple-config.conf b/tests/modules/services/window-managers/hyprland/simple-config.conf index c076f5382..a10e2b66d 100644 --- a/tests/modules/services/window-managers/hyprland/simple-config.conf +++ b/tests/modules/services/window-managers/hyprland/simple-config.conf @@ -1,6 +1,6 @@ exec-once = @dbus@/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target -plugin=/path/to/plugin1 -plugin=/nix/store/00000000000000000000000000000000-foo/lib/libfoo.so +exec-once=/nix/store/00000000000000000000000000000000-hyprland/bin/hyprctl plugin load /path/to/plugin1 +exec-once=/nix/store/00000000000000000000000000000000-hyprland/bin/hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so $mod=SUPER bezier=smoothOut, 0.36, 0, 0.66, -0.56 bezier=smoothIn, 0.25, 1, 0.5, 1