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/tailscale: use upstream systemd service config. #102202
Conversation
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.
Can we just use the upstream unit directly instead? Better than playing catch-up.
I don't think so? The unit generated by NixOS modules is way different than the upstream one (e.g. upstream assumes /usr/sbin/tailscaled as the path). Do you have an example of a module that reuses an upstream service config that I can pull from? |
Certainly. I recently switched dnsdist over to use the upstream service. A couple points to note:
It looks relatively straight forward to use the upstream unit, but if you run into any issues I would be more than happy to help. |
I'm also the maintainer of the upstream unit, so using it as close to as-is as possible SGTM. We don't have a build system upstream that handles install prefixes though, the systemd unit is just what we use to generate .deb and .rpm packages. That said, I can adjust things in the tailscale derivation rather than the nixos module, so that the module doesn't need any further tweaks. I'll update this PR with fixes to the package and module, thanks for the guidance! |
72786e8
to
41b21c8
Compare
9011094
to
3df257d
Compare
@aanderse Ready for another look. The package now includes the systemd unit (with correct paths and removed impure /etc reference), and the module is the minimum deviation from that to make the module parameter work. Tested successfully on my own NixOS systems. |
Signed-off-by: David Anderson <dave@natulte.net>
3df257d
to
503caab
Compare
Thanks @danderson 🎉 |
Signed-off-by: David Anderson dave@natulte.net
Motivation for this change
Importing systemd unit change from upstream.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)