diff --git a/modules/services/window-managers/hyprland.nix b/modules/services/window-managers/hyprland.nix index b8543afca..9d81a318f 100644 --- a/modules/services/window-managers/hyprland.nix +++ b/modules/services/window-managers/hyprland.nix @@ -291,9 +291,8 @@ in 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 (p: "${hyprctl} plugin load ${mkEntry p}") 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 f0b1780bd..664421b6d 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 -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 +exec-once=hyprctl plugin load /path/to/plugin1 +exec-once=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/null-package-config.conf b/tests/modules/services/window-managers/hyprland/null-package-config.conf new file mode 100644 index 000000000..39f00c778 --- /dev/null +++ b/tests/modules/services/window-managers/hyprland/null-package-config.conf @@ -0,0 +1,7 @@ +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 +exec-once=hyprctl plugin load /path/to/plugin1 +exec-once=hyprctl plugin load /nix/store/00000000000000000000000000000000-foo/lib/libfoo.so +cursor { + enable_hyprcursor=true + sync_gsettings_theme=true +} diff --git a/tests/modules/services/window-managers/hyprland/null-package-config.nix b/tests/modules/services/window-managers/hyprland/null-package-config.nix index 2550b690d..f226ed8ac 100644 --- a/tests/modules/services/window-managers/hyprland/null-package-config.nix +++ b/tests/modules/services/window-managers/hyprland/null-package-config.nix @@ -1,7 +1,13 @@ +{ config, ... }: + { wayland.windowManager.hyprland = { enable = true; package = null; + plugins = [ + "/path/to/plugin1" + (config.lib.test.mkStubPackage { name = "foo"; }) + ]; settings = { cursor = { enable_hyprcursor = true; @@ -29,5 +35,8 @@ nmt.script = '' config=home-files/.config/hypr/hyprland.conf assertFileExists "$config" + + normalizedConfig=$(normalizeStorePaths "$config") + assertFileContent "$normalizedConfig" ${./null-package-config.conf} ''; } diff --git a/tests/modules/services/window-managers/hyprland/simple-config.conf b/tests/modules/services/window-managers/hyprland/simple-config.conf index a10e2b66d..261b0d93f 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 -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 +exec-once=hyprctl plugin load /path/to/plugin1 +exec-once=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