diff --git a/misc/wg-client-conf.nix b/misc/wg-client-conf.nix index c7d5e5c..f4d29de 100644 --- a/misc/wg-client-conf.nix +++ b/misc/wg-client-conf.nix @@ -1,4 +1,3 @@ -# use nix-build -E (import /misc/wg-client-conf.nix {}) { pkgs ? import { } , address , privateKey diff --git a/notes/vpn.md b/notes/vpn.md index 07e2c6b..f143b42 100644 --- a/notes/vpn.md +++ b/notes/vpn.md @@ -1,6 +1,6 @@ # WireGuard -## Generate keypair +## Generate key pair ```sh umask 077 @@ -8,6 +8,20 @@ wg genkey > ./private wg pubkey < ./private > ./public ``` + +## Configuration + +Then create QR code with configuration using the following command: + +```sh +nix build -f ./misc/wg-client-conf.nix \ + --argstr address "" \ + --argstr dns "" \ + --argstr privateKey "$(cat private)" \ + --argstr serverPublicKey "" \ + --argstr serverEndpoint "" +``` + # References: - https://nixos.wiki/wiki/WireGuard