Open sg-qwt opened 11 months ago
Thanks for documenting this. I've been debugging for a while. Was trying to figure out what's wrong with my config...
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/cant-get-systemd-to-restart-my-units-on-change/34139/2
Thanks for documenting this. I've been debugging for a while. Was trying to figure out what's wrong with my config...
btw, home manager has proper support for such use case. https://github.com/nix-community/home-manager/issues/5452
@sg-qwt Sweet! I did not know about sd-switch
. This is a sufficient workaround for me. Thanks for pointing me to it.
example:
adding systemd.user.services.emacs.restartTriggers = [ ./init.el ]; will add X-Restart-Triggers to the user unit file.
But it won't have any effects or trigger any restarts on system rebuild.
nixos-options show thoes options exist, but looking into https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/activation/switch-to-configuration.pl, it seems doesn't take user services into account.
https://search.nixos.org/options?channel=unstable&show=systemd.user.services.%3Cname%3E.restartTriggers&from=0&size=50&sort=relevance&type=packages&query=systemd+triggers