aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages/wiki.md50
-rw-r--r--pages/wiki/openbsd/installation.md99
-rw-r--r--wruby.rb9
3 files changed, 121 insertions, 37 deletions
diff --git a/pages/wiki.md b/pages/wiki.md
index af81f16..af4d845 100644
--- a/pages/wiki.md
+++ b/pages/wiki.md
@@ -5,57 +5,39 @@ This is the homepage for my personal wiki. All sub-directories are listed below.
## Software
* [alpine linux](/wiki/alpine-linux)
-* [[wiki/dotfiles]]
-* [[wiki/openbsd]]
-* [[wiki/qutebrowser]]
-* [[wiki/safari]]
-* [[wiki/scripts]]
-* [[wiki/sublime-text]]
-* [[wiki/ubuntu]]
+* [dotfiles](/wiki/dotfiles)
+* [openbsd](/wiki/openbsd)
+* [qutebrowser](/wiki/qutebrowser)
+* [safari](wiki/safari)
+* [scripts](wiki/scripts)
+* [sublime text](/wiki/sublime-text)
+* [ubuntu](wiki/ubuntu)
---
## Hardware
-* [[wiki/xbox]]
-* [[wiki/ps2]]
+* [xbox](/wiki/xbox)
+* [ps2](/wiki/ps2)
---
## Version Control Systems
-* [[wiki/cgit]]
+* [cgit](/wiki/cgit)
---
## ikiwiki
-[[!meta robots="noindex, follow"]]
-This wiki is powered by [ikiwiki](http://ikiwiki.info/).
-[[!if test="enabled(version)"
- then="(Currently running version [[!version ]].)"
-]]
-
-The default documentation on using ikiwiki:
-
-* [[ikiwiki/formatting]]
-* [[ikiwiki/wikilink]]
-* [[ikiwiki/subpage]]
-* [[ikiwiki/pagespec]]
-* [[ikiwiki/directive]]
-* [[ikiwiki/markdown]]
-* [[ikiwiki/openid]]
-* [[ikiwiki/searching]]
-* [[templates]]
-
My own custom documentation for ikiwiki:
-* [[ikiwiki/NearlyFreeSpeech]]
-* [[ikiwiki/git]]
-* [[ikiwiki/comments]]
-* [[ikiwiki/search]]
+* [NearlyFreeSpeech](/ikiwiki/NearlyFreeSpeech)
+* [git](/ikiwiki/git)
+* [comments](/ikiwiki/comments)
+* [search](/ikiwiki/search)
## WordPress
-* [[wordpress/database_update]]
-* [[wordpress/NearlyFreeSpeech_Setup]]
+* [Database Update](/wordpress/database_update)
+* [NearlyFreeSpeech Setup](/wordpress/NearlyFreeSpeech_Setup)
diff --git a/pages/wiki/openbsd/installation.md b/pages/wiki/openbsd/installation.md
new file mode 100644
index 0000000..869510f
--- /dev/null
+++ b/pages/wiki/openbsd/installation.md
@@ -0,0 +1,99 @@
+# Installing OpenBSD
+
+Below you can find instructions for installing OpenBSD on a personal computer.
+
+The example below covers installing **OpendBSD 7.5** on a X220 ThinkPad laptop.
+
+## Requirements
+
+* USB device
+* Ethernet connection (with active internet)
+* A cup of coffee
+
+## Before the Install
+
+Make sure you have the latest OpenBSD image formatted on your USB device and that your computer/laptop is set to boot from USB via the BIOS.
+
+## Installation
+
+1. Boot from USB
+2. Choose `Install`
+3. Keyboard layout: `us`
+4. Hostname: `x220` (or whatever you choose)
+5. Network: `em0`
+6. IPv4: `autoconf`
+7. IPv6: `none`
+8. Network interface: `done`
+9. Password for root
+10. Start sshd by default? `yes`
+11. X Window System start with xenodm? `no`
+12. Setup user? `username` (follow setup user steps)
+13. Allow root ssh login? `no`
+14. Timezone
+15. Which disk? Use internal (`sd0` etc.)
+16. Encrypt root disk? `no`
+17. Use `WHOLE` disk
+18. Use `AUTO` layout
+19. Which disk to initialize: `done`
+20. Location of sets: `http`
+21. HTTP Proxy URL? `none`
+22. HTTP Server? `1` (Toronto)
+23. Confirm again
+24. Server directory? `pub/OpenBSD/7.5/amd64`
+25. Set names? `done`
+26. Drink some coffee while it verifies (depends on network speed)
+27. Location of sets? `done`
+28. Congrats!
+29. Reboot and remove USB device
+
+## First Boot Tweaks
+
+### User Permissions
+
+Before we do anything, we should give our main user full access via `doas`. Login as `root` and run the following:
+
+ echo "permit nopass :wheel" >> /etc/doas.conf
+
+Now you can logout or reboot the machine.
+
+Running any of the commands might present you with a permissions error. If that happens, simply add `doas` to the start of every command.
+
+### Firmware
+
+Once your machine reboots, login as your created user. The next steps will help you ensure you have the latest firmware.
+
+Simply run the command: `fw_update`
+
+
+### WiFi
+
+To enable wifi on your device, run the following command (filling in the proper details where need be)
+
+ ifconfig iwn0 up
+ ifconfig iwn0 scan
+ echo "join WIFI-NAME wpakey PASSPHRASE" >> /etc/hostname.iwn0
+ echo "dhcp" >> /etc/hostname.iwn0
+ echo "inet6 autoconf" >> /etc/hostname.iwn0
+ echo "up powersave" >> /etc/hostname.iwn0
+ dhclient iwn0
+
+Take note of the `iwn0`, as this might differ on your machine. (You can check this by running `ifconfig`)
+
+You might also need to run `doas sh /etc/netstart` after.
+
+
+### Performance Boost
+
+This step is optional and targeted towards devices with batteries (obviously). Properly setup apmd:
+
+ rcctl enable apmd
+ rcctl set apmd flags -A
+ rcctl start apmd
+
+
+## Next Steps
+
+Now that the base system is up and running, it is time to setup our desktop environment:
+
+[Setting up a Desktop Environment for OpenBSD →](/wiki/openbsd/desktop_environment)
+
diff --git a/wruby.rb b/wruby.rb
index 214e7a5..180b2e2 100644
--- a/wruby.rb
+++ b/wruby.rb
@@ -2,6 +2,7 @@ require 'kramdown'
require 'fileutils'
require 'date'
require 'rss'
+require 'find'
# Configuration all the things!
site_url = 'https://bt.srht.site'
@@ -42,15 +43,17 @@ end
def process_markdown_files(input_directory, output_directory, header_content, footer_content)
items = []
- Dir.glob("#{input_directory}/**/*.md").each do |md_file|
- md_content = File.read(md_file)
+ Find.find(input_directory) do |path|
+ next unless path =~ /\.md\z/
+
+ md_content = File.read(path)
lines = md_content.lines
title = extract_title_from_md(lines)
date = Date.parse(lines[2]&.strip || '') rescue Date.today
html_content = Kramdown::Document.new(md_content).to_html
- relative_path = md_file.sub(input_directory + '/', '').sub('.md', '')
+ relative_path = path.sub(input_directory + '/', '').sub('.md', '')
item_dir = File.join(output_directory, relative_path)
output_file = "#{item_dir}/index.html"
FileUtils.mkdir_p(item_dir)