-
-
Notifications
You must be signed in to change notification settings - Fork 85
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: Manage files using systemd services #44
Conversation
I'm using this PR, and I'm seeing this behavior.
Frustratingly there's a sort of silent rollback there and the new generation is not activated or marked as the running generation. I guess I can just reboot after I set the system profile every time, but that's not ideal... |
Seems like it fixed it! |
5e8913a
to
d430605
Compare
Great! Thanks again for trying it out! |
What's the state on this PR? Is it going to be merged soon? |
I think it's done, but I would prefer to get some more testing and reviews before merging it. Ping @etu @lovesegfault @cole-h |
d430605
to
d3e5786
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better. I (still >.<) have no way to test this, but the diff looks sane to me.
d3e5786
to
05271bb
Compare
I'm going to test this today without fault. |
Seems to be working AOK :)
|
@lovesegfault I think having |
@lovesegfault Well, the problem is that we don't know wether we'll link or bind mount until the service runs, so I think |
How about just |
Yeah, that sounds good! |
05271bb
to
ef7df27
Compare
@lovesegfault Changed! :) |
Manage files by creating a systemd oneshot service for each file. The service links or bind mounts the file as appropriate on start and removes the link or unmounts it when stopped. Whether a symlink or bind mount is used is determined by if the target exists - if it does, it's bind mounted, otherwise symlinked. To make sure files are available early enough, also run the start portion in the activation script. This lifts the restriction on files being placed in `/etc` and should finally close #1.
ef7df27
to
96fc549
Compare
@cole-h All done! I kept the names of the |
Thank you for tackling this @talyz! |
Manage files by creating a systemd oneshot service for each file. The service links or bind mounts the file as appropriate on start and removes the link or unmounts it when stopped. Whether a symlink or bind mount is used is determined by if the target exists - if it does, it's bind mounted, otherwise symlinked. To make sure files are available early enough, also run the start portion in the activation script.
This lifts the restriction on files being placed in
/etc
and should finally close #1.