naggie / dsnet

FAST command to manage a centralised wireguard VPN. Think wg-quick but quicker: key generation + address allocation.
https://calbryant.uk/blog/how-to-set-up-a-wireguard-vpn-in-minutes-with-dsnet/
MIT License
673 stars 33 forks source link

Add a NixOS peer config template / generator. #30

Closed axelsimon closed 3 years ago

axelsimon commented 3 years ago

First attempt at Go, hope all is good.

This will generate a config that should ready to copy and paste into a Nixos configuration.nix. Tests welcome.

naggie commented 3 years ago

Cool, thanks! I recently changed the way config files determine the server peer Endpoint though -- moved the logic out of the templates as there is now a third possible option which has precedence, ExternalHost. Please could you update the PR to be consistent with the other 2 configs.

Otherwise looks good to me. I assume you've tested that it works.

axelsimon commented 3 years ago

Alright, let me look into that. Yes, i've been testing it and checking the copy-paste really produces something that just works for Nix. Force-pushed a few commits to get to that point ;)

axelsimon commented 3 years ago

@naggie Should be good, now. Let me know if it looks good to you :)

naggie commented 3 years ago

LGTM -- much appreciated. Thank you!

naggie commented 3 years ago

I made a new release, v0.5. 2 in one day!