-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos: systemd user services #1689
Comments
I have some ideas for how to do this properly (and they would even work on non-nixos systems that use systemd), but they will need to wait until #1021 is fixed as systemd has changed how user services work since our systemd version. |
Essentially we'd use the module system to define units and use that config to ultimately create a symlink tree that contains a bunch of unit files, plus an activation script to update relevant symlinks in the user's HOME and reload any needed targets, then have a simple tool like nixos-rebuild (that nixos-rebuild can hook into) to rebuild the tree + activation script and run the script. |
+1 |
In the interim, you can use service-runner.nix, see 2b0aea1. |
@edolstra thanks, exactly what i needed for now :) |
We should have someting like |
I am now working on something similar now (https://github.com/offlinehacker/nix-services). I use supervisor for managing processes(basically expression from @zefhemel for nix-docker), because systemd does not work on darwin. |
Note also that @proger is working on an abstraction around services that might be useful here. Seems like a lot of people are converging on this problem :) |
I already have working implementation, which uses supervisord for running
|
Ah cool, I just asked for that in another PR :) I think after |
I no longer expect to have the bandwidth to take this on. |
duplicate of #1689 |
@iElectric you closed this on the basis of it being a duplicate of #1689, but this is #1689. Did you have another issue in mind, or should this be reopened? |
@iElectric did you mean #4493 or #4594 or something else? |
@wmertens correct, sorry for wrong info. |
So systemd supports user services, and some/most of nixos modules would not need a lot of changing to work in user environemnts(ex. changing the state dir). @zefhemel used supervisor for that(https://github.com/zefhemel/nix-docker), but that's not necessary and i would like to implement this, but first i would also like to get comments from others and especially @edolstra how to properly implement this.
The text was updated successfully, but these errors were encountered: