- declare ips and peers and connections in one file
- Peers are automagically configured
- uses wg0 as a default interface
- easy organization of private and public keys
This gets interesting if you have upwards of 3-4 peers as manually configuring each host becomes messy and hard to maintain
You can take a look at my dotfiles or more specifically at my base.nix
- Allow multiple Interfaces Syntax:
"hostname%interface"
- To be determined:
- either throw a warning if wireguard is enabled without a connection
- or autmatically enable the module if some config is present for the host
This Code is far from perfect...
This flake arose because I wanted to share parts of my config to friends, as well as the world.
If you want to contribute just open a PR or Issue and make sure to run nixfmt before you submit your code.