The configuration and setup guide used to create a Wireguard VPN server using Google Cloud and NixOS.
- In order to setup a VM instance using NixOS I followed this post.
- Then I created a static IP address following this.
- I added this firewall rule in order to accept incoming traffic
To install the wireguard server just clone the content of configuration.nix into /etc/nixos/configuration.nix, or, clone the repository.
cd /etc
git clone git@github.com:hugolgst/nixos-wireguard.git nixosThen tweak the configuration.nix for your needs.
and rebuild the system.
nixos-rebuild switch