diff options
Diffstat (limited to '')
-rw-r--r-- | docs/wireguard.org | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/wireguard.org b/docs/wireguard.org new file mode 100644 index 0000000..456205f --- /dev/null +++ b/docs/wireguard.org @@ -0,0 +1,23 @@ +#+TITLE: Configuration for wireguard + +* Creating the keys +Create a directory with the hostname under =secrets/network/=. + +We need a key for the host: +#+begin_src sh +(umask 0077; wg genkey > peer_A.key) +#+end_src + +Next we create the public key: +#+begin_src sh +wg pubkey < peer_A.key > peer_A.pub +#+end_src + +Now we need to add the private key to the list of secrets: +#+begin_src sh +nix run github:ryantm/agenix -- -e secrets/network/<host name>/wireguard_privatekey.age +#+end_src + +Once this is done, update [[file:~/workspace/world/configs/wireguard.toml][wireguard.toml]] to add the new peer with the public key. + +Once this is completed, we can delete the files =peer_A.key= and =peer_A.pub=. |