Closed leon-erd closed 9 months ago
If you also use the Hyprland Home Manager service (or dbus-update-activation-environment --systemd --all
) it should work just fine.
The trick is to use wayland.windowManager.hyprland.systemd.variables = ["--all"];
.
Ahh this is perfect! I didn't know about this option but this is exactly what I wanted. Works like a charm :) Should we add a nix section to the README? If so I think it would be nice to state this there.
Sure, we can do that. The part about "--all"
should also be added to the HM page on the wiki.
@fufexan Currently the hypridle systemd service does not inherit the $PATH variable that is available in your terminal. This makes it necessary to define the exact path to every executable in your hypridle.nix (i.e.
lockCmd = lib.meta.getExe config.programs.hyprlock.package;
) and hyprlock.nix (i.e.labels = [ {text = ''cmd[update:10000] echo "$(${pkgs.coreutils}/bin/date" +'%a %d. %b')"'';} ]
). This is not only inconvenient but might also frustrate new users who do not know why their configuration is not working out of the box.We could maybe set
in the systemd unit? But I do not know where nixos defines the PATH variable and I did not really find anything online (maybe I searched in the wrong places...), hence this issue.
Another option would be to hardcode a PATH variable into the service which seems a bit worse.