From 46ede8362e1d73120e4fd66956f11084ff7d8ed0 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 25 Oct 2021 00:23:20 -0400 Subject: [PATCH] notes: Add various markup fixups Apparently nested code blocks in lists are finnicky? --- notes/006-use-the-src.md | 37 +++++++++++++++++++------------------ notes/009-wireguard.md | 22 +++++++++++----------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/notes/006-use-the-src.md b/notes/006-use-the-src.md index 61734c9..56f699a 100644 --- a/notes/006-use-the-src.md +++ b/notes/006-use-the-src.md @@ -26,26 +26,27 @@ you to put it there (for build purposes). To get it: 1. Add yourself to the wsrc and wobj groups so you can build without doas - - # usermod -G wsrc,wobj - +``` + # usermod -G wsrc,wobj +``` 2. Clone a bare repo to /var/git (default /usr/src not big enough for .git) - - # mkdir /var/git - # chmod 775 /var/git - # chown root:wsrc /var/git - $ cd /var/git - $ git clone --bare https://github.com/openbsd/src - +``` + # mkdir /var/git + # chmod 775 /var/git + # chown root:wsrc /var/git + $ cd /var/git + $ git clone --bare https://github.com/openbsd/src +``` 3. Check out a new worktree at /usr/src - - $ git -C /var/git/src.git worktree add /usr/src - +``` + $ git -C /var/git/src.git worktree add /usr/src +``` 4. Find your favorite tool and build it - - $ cd /usr/src/bin/ed - $ make obj # for out of tree build, see make(1) OBJDIR - $ make - $ ./obj/ed +``` + $ cd /usr/src/bin/ed + $ make obj # for out of tree build, see make(1) OBJDIR + $ make + $ ./obj/ed +``` How cool is that? diff --git a/notes/009-wireguard.md b/notes/009-wireguard.md index 500a108..3fd6133 100644 --- a/notes/009-wireguard.md +++ b/notes/009-wireguard.md @@ -50,17 +50,17 @@ And then each host has a directory: The tool is called wggen(1) [1], and it ends up effectively: - 1) Creating a directory for NAME - 2) Generating a wg(8) key using openssl(1): - - openssl rand -base64 32 > private.key - - 3) Creating a temporary wg endpoint to get the public key using - the grep/cut hack in wg(8)'s EXAMPLES - 4) tail(1)-ing the host file to get the next available IP - 5) Using all the above to generate the client.conf - 6) Adding the wgpeer line to /etc/hostname.wg0 and restarting the - prod endpoint with sh /etc/netstart +1. Creating a directory for NAME +2. Generating a wg(8) key using openssl(1): +``` + openssl rand -base64 32 > private.key +``` +3. Creating a temporary wg endpoint to get the public key using + the grep/cut hack in wg(8)'s EXAMPLES +4. tail(1)-ing the host file to get the next available IP +5. Using all the above to generate the client.conf +6. Adding the wgpeer line to /etc/hostname.wg0 and restarting the + prod endpoint with sh /etc/netstart I'll leave the exact details as an exercise for the reader to go look at the git repo :) -- libgit2 1.1.1