From 4016eb1b71ba759d371458d97f3584216f27f119 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 27 Aug 2024 23:49:14 +0300 Subject: [PATCH] notes/vpm: update information about creating qr code with configs --- misc/wg-client-conf.nix | 1 - notes/vpn.md | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) 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