diff options
| author | Mihai Fufezan <fufexan@protonmail.com> | 2022-08-14 23:09:39 +0300 |
|---|---|---|
| committer | Mihai Fufezan <fufexan@protonmail.com> | 2022-08-14 23:45:55 +0300 |
| commit | ed1b72f37d1038d36974ff1c857846b2e2a0b836 (patch) | |
| tree | 9b5bc0d9da7bd795b1f3bf1148e27de220a4c47f | |
| parent | 28867758c486b12ebe387d72bba2be67a7dc8a2a (diff) | |
Nix HM module: add XDG_SESSION_TYPE, fix reload
| -rw-r--r-- | nix/hm-module.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nix/hm-module.nix b/nix/hm-module.nix index 8b2ce883..9b65e417 100644 --- a/nix/hm-module.nix +++ b/nix/hm-module.nix @@ -65,9 +65,11 @@ in { xdg.configFile."hypr/hyprland.conf" = { text = - (lib.optionalString cfg.systemdIntegration " - exec-once=${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP; systemctl --user start hyprland-session.target - ") + (lib.optionalString cfg.systemdIntegration '' + exec-once=export XDG_SESSION_TYPE=wayland + exec-once=${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP + exec-once=systemctl --user start hyprland-session.target + '') + cfg.extraConfig; onChange = let @@ -75,7 +77,7 @@ in { if cfg.package == null then defaultHyprlandPackage else cfg.package; - in "${hyprlandPackage}/bin/hyprctl reload"; + in "HYPRLAND_INSTANCE_SIGNATURE=$(ls -w 1 /tmp/hypr | tail -1) ${hyprlandPackage}/bin/hyprctl reload"; }; systemd.user.targets.hyprland-session = lib.mkIf cfg.systemdIntegration { |
