My VPN provides a bunch of wg-quick files who’s configuration I’d like to incorporate into my nix system. I suppose it wouldn’t be too hard to do this manually, but ideally I would like to the configuration to be nearly as easy as it is on conventional distros (i.e. simply drop them all into a folder and rebuild). This would make porting my configuration to other systems less painful since it is unlikely they would share the same wg-quick configuration.
My question is how should I approach this? How would you approach this? Is it a good idea to parse the configuration file and map it to networking.wg-quick? If so, would you generate and enclose the nix version of the wg-quick configuration in a derivation (vs. a simple function called by configuration.nix)? Is there a better/simpler approach?