Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Motivation for this change
Add a NixOS service using the systemd socket activation for
Feedback on the service implementation is appreciated, this is my first time adding a NixOS service.
I updated the pull-request to an improved version that would work with the current version of spacecookie.
I noticed a bit of an annoyance though: Due to a bug in
Also I'd love to solve the
@sternenseemann how does the service in the currently released version behave if started with this module?
You can definitely set
@flokli With the current released version, it would work fine. The only annoyance is that after starting, it would call setUserID to switch to the uid of
A NixOS test is a great idea though, I'll look into it.
The problem is not setting up the socket in the services, but letting systemd set it up. Spacecookie launch can together with systemd be set up like this:
From checking Lennart Poettering's blog post on the topic and checking the
We could also ditch the
I assume you want to bind to a port, so this shouldn't matter. You might need
@flokli Oh yeah, completely missed that. I guess systemd then ensures, the socket can only be accessed by the corresponding service?
Binding is no problem though, since this is done by systemd, not spacecookie.
I have updated the service to work with the new spacecookie release and
Still looking into a test, but we'll have to wait for the hackage-package-update anyways.
@dasJ can you have another look at the changed service/socket config?