Skip to content

Commit 36426b2

Browse files
committed
mostly some small internal changes relating to automation
1 parent 0411d5b commit 36426b2

7 files changed

Lines changed: 69 additions & 45 deletions

File tree

.eleventy.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import { default as markDownItAnchor } from "markdown-it-anchor";
2+
import { DateTime } from "luxon";
3+
4+
const TIME_ZONE = "America/New_York";
25

36
export const config = {
47
dir: {
@@ -12,4 +15,27 @@ export default async function (eleventyConfig) {
1215
eleventyConfig.addPassthroughCopy("images/*")
1316

1417
eleventyConfig.amendLibrary("md", (mdLib) => mdLib.use(markDownItAnchor), {level: [2, 3, 4]});
18+
19+
eleventyConfig.addDateParsing(function(dateValue) {
20+
let localDate;
21+
if(dateValue instanceof Date) {
22+
localDate = DateTime.fromJSDate(dateValue, {zone: "utc" }).setZone(TIME_ZONE, { keepLocalTime: true });
23+
} else if(typeof dateValue == "string") {
24+
localDate = DateTime.fromISO(dateValue, { zone: TIME_ZONE });
25+
}
26+
if (localDate?.isValid === false) {
27+
throw new Error(`Invalid \`date\` value (${dateValue}) is invalid for ${this.page.inputPath}: ${localDate.invalidReason}`);
28+
}
29+
return localDate;
30+
});
31+
eleventyConfig.addFilter("dateOnly", async function (dateVal, locale = "en-us") {
32+
var date = new Date(dateVal);
33+
const options = { year: "numeric", month: "short", day: "numeric" };
34+
return date.toLocaleDateString(locale, options);
35+
});
36+
37+
eleventyConfig.setFrontMatterParsingOptions({
38+
excerpt: true,
39+
excerpt_separator: "<!-- excerpt -->",
40+
});
1541
}

_includes/home.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
</div>
2222
</div>
2323
<div class="window-body has-space">
24+
<menu role="tablist" aria-label="Tabs">
25+
<button role="tab" aria-controls="home" aria-selected="true">Home</button>
26+
<button role="tab" aria-controls="about-me">About me</button>
27+
<button role="tab" aria-controls="projects">Projects</button>
28+
<button role="tab" aria-controls="resources">Resources</button>
29+
</menu>
2430
{{ content }}
2531
</div>
2632
<footer>

_includes/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<article role="tabpanel">
2424
<a id="top" href="/">← 🏡 Home</a>
2525
<h1>{{ title }}</h1>
26-
<pre><code>#include metadata.h<br>// Created {{ created }}<br>// Last updated {{ lastUpdated }}</code></pre>
26+
<pre><code>#include metadata.h<br>// Created {{ page.date | dateOnly }}<br>// Last updated {{ lastUpdated }}</code></pre>
2727
{% if toc %}
2828
<details id="toc">
2929
<summary>Table of Contents</summary>

css/style.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ table {
198198
margin-bottom: 1em;
199199
}
200200

201+
/* post list */
202+
ul.posts {
203+
list-style: none;
204+
padding: 0;
205+
}
206+
201207
/*************************************************************/
202208
/* Dark Mode */
203209
/*************************************************************/

index.md

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ layout: home.html
33
title: EJSnow
44
---
55

6-
<menu role="tablist" aria-label="Tabs">
7-
<button role="tab" aria-controls="home" aria-selected="true">Home</button>
8-
<button role="tab" aria-controls="about-me">About me</button>
9-
<button role="tab" aria-controls="projects">Projects</button>
10-
<button role="tab" aria-controls="resources">Resources</button>
11-
</menu>
126
<!-- Home -->
137
<article role="tabpanel" id="home">
148

@@ -19,12 +13,13 @@ title: EJSnow
1913
My main PC ([View project](projects/2024-10-05-redstone-computer/)):
2014
<img class="lightboxed" alt="The Redstone Computer, Sep 13 2025, running Arch Linux" src="images/redstone-computer.jpg">
2115
</article>
16+
2217
<!-- About me -->
2318
<article role="tabpanel" id="about-me" hidden>
2419

2520
# About me
2621

27-
I'm Ezra Snow, a nerdy (extremely) 17 year old guy who may be addicted to computers and Linux (I spend far too much time using and messing with Linux on my computer). I currently live in North Carolina, and I'm a senior in high school. After I graduate, I'm going to study computer science at LeTourneau University. When I'm not doing school or messing with Linux, I'm often playing video games.
22+
I'm Ezra Snow, a nerdy (extremely) 17 year old guy who may be addicted to computers and Linux (I spend far too much time using and messing with Linux on my computer). I currently live in North Carolina, and I'm a senior in high school. After I graduate, I'm going to study computer science at LeTourneau University (yes, it's far, but I have reasons). When I'm not doing school or messing with Linux, I'm often playing video games.
2823

2924
Games I like (in no particular order):
3025

@@ -132,25 +127,14 @@ Cool stuff I've made. Check my <a target="_blank" href="https://github.com/ejsno
132127

133128
# Resources
134129

135-
Documents I have here for future reference. Mainly guides for setting up Linux currently. Just for the record this is for my own personal reference mostly and they're on here just because this is a convenient way of accessing them from anywhere. These mostly aren't general purpose guides; check official documentation (like the [ArchWiki](https://wiki.archlinux.org)) or other locations of good repute for those. ;)
130+
Things I have for future reference; they're on here because this makes them easy to access from anywhere. These mostly aren't general purpose guides; check official documentation (like the [ArchWiki](https://wiki.archlinux.org)) or other locations of good repute for those. ;)
136131

137132
## Linux stuff
138133

139-
<section>
140-
141-
### Arch Linux Installation (including LUKS encryption with TPM2 and Secure Boot)
142-
143-
**Last updated Mar 6, 2026**
144-
<p style="margin-top: 0.5em">A guide documenting my preferred route for installing Arch Linux, including full disk encryption and Secure Boot support. Mostly just in case I ever have to do a full reinstall or I'm setting up a new PC.</p>
145-
<p style="text-align: right"><a href="resources/archlinux-installation">View</a></p>
146-
</section>
147-
<section>
148-
149-
### Using Secure Boot on Linux with GRUB
150-
151-
**Last updated Mar 4, 2026**
152-
<p style="margin-top: 0.5em">I recently set up Secure Boot on Twilight (my laptop) and the ArchWiki's documentation was a little confusing so here's a more concise guide that only deals with GRUB. NOTE: I actually switched to systemd-boot but I'm leaving this here in the hopes that this is somewhat useful to someone else :)</p>
153-
<p style="text-align: right"><a href="resources/using-secure-boot-on-arch">View</a></p>
154-
</section>
134+
<ul class="posts">
135+
{%- for resource in collections.resource -%}
136+
<li><h3>{{ resource.data.title }}</h3><small><b>Last updated {{ resource.data.lastUpdated }} • Created {{ resource.page.date | dateOnly }}</b></small><p style="margin: 0.5em 0 0">{{ resource.page.excerpt }}</p><p style="text-align: right; margin-top: 0"><a href="{{ resource.page.url }}">View</a></p></li>
137+
{%- endfor -%}
138+
</ul>
155139

156140
</article>

resources/archlinux-installation.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
---
22
layout: page.html
3-
title: Arch Linux Installation
4-
created: Jan 31, 2026
3+
title: Arch Linux Installation (with full disk encryption using TPM2 and Secure Boot)
4+
date: 2026-01-31
55
lastUpdated: Mar 6, 2026
66
toc: true
7+
tags: resource
78
---
89

10+
My preferred route for installing Arch Linux including full disk encryption (with TPM2-based automatic unlocking!) and Secure Boot support. This mostly exists just in case I ever have to do a full reinstall/just because I want to fully document my installation route.
11+
12+
<!-- excerpt -->
13+
914
**Important:** This is my own personalized installation guide for personal use. I do not recommend following this if you aren't me. Use the [official installation](https://wiki.archlinux.org/title/Installation_guide) guide instead.
1015

11-
This setup implements Secure Boot and full disk encryption with automated unlocking provided by the TPM2. The system boots from a signed unified kernel image (UKI) to eliminate complex bootloader configuration (the UKI is stored on the ESP and has the kernel command line embedded).
16+
This setup uses systemd-boot as the bootloader and boots from a signed unified kernel image (UKI) incorporating the kernel image, initrd, and kernel commandline in one file to reduce complexity (as a side benefit, the initrd and kernel commandline are also validated by Secure Boot).
1217

1318
## Warming up
1419

@@ -178,16 +183,16 @@ And finally my Plasma dotfiles. Follow the instructions on [the repository](http
178183

179184
## References
180185

181-
I wrote this with the help of MANY ArchWiki pages and a few manpages.
186+
I wrote this with the help of MANY ArchWiki pages and a few manpages. Seriously the ArchWiki is amazing, go [check it out](https://wiki.archlinux.org).
182187

183-
* [The official installation guide](https://wiki.archlinux.org/title/Installation_guide)
188+
* [The official installation guide](https://wiki.archlinux.org/title/Installation_guide) (The basic skeleton for this page)
184189
* [This example for encrypting your installation](https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#LUKS_on_a_partition_with_TPM2_and_Secure_Boot) (I basically lifted the encryption instructions from there)
185-
* [mkfs.ext4 manpage](https://man.archlinux.org/man/mkfs.ext4.8.en)
186-
* [mkfs.fat manpage](https://man.archlinux.org/man/mkfs.fat.8.en)
187-
* [Reflector examples](https://man.archlinux.org/man/reflector.1#EXAMPLES)
190+
* [mkfs.ext4 manpage](https://man.archlinux.org/man/mkfs.ext4.8.en) (mostly for adding a filesystem label when formatting)
191+
* [mkfs.fat manpage](https://man.archlinux.org/man/mkfs.fat.8.en) (Same as above)
192+
* [Reflector examples](https://man.archlinux.org/man/reflector.1#EXAMPLES) (Used this to build the mirrorlist generator command)
188193
* [Swap on zram](https://wiki.archlinux.org/title/Zram#Usage_as_swap)
189194
* [Hibernation](https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation)
190-
* [AMD graphics (AMDGPU)](https://wiki.archlinux.org/title/AMDGPU)
191-
* [Intel graphics](https://wiki.archlinux.org/title/Intel_graphics)
192-
* [Hardware video acceleration](https://wiki.archlinux.org/title/Hardware_video_acceleration)
193-
* [Installing AUR packages](https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages)
195+
* [AMD graphics (AMDGPU)](https://wiki.archlinux.org/title/AMDGPU) (For the required packages table in [#Desktop Environment](#desktop-environment))
196+
* [Intel graphics](https://wiki.archlinux.org/title/Intel_graphics) (same as above)
197+
* [Hardware video acceleration](https://wiki.archlinux.org/title/Hardware_video_acceleration) (Same as above lol)
198+
* [Installing AUR packages](https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages) (For installing yay at the very end)

resources/using-secure-boot-on-arch.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
---
22
layout: page.html
3-
title: Using Secure Boot on Arch
4-
created: Feb 25, 2026
3+
title: Using Secure Boot on Arch Linux with GRUB
4+
date: 2026-02-25
55
lastUpdated: Mar 4, 2026
66
toc: true
7+
tags: resource
78
---
89

9-
## Update (Mar 4, 2026)
10+
I recently set up Secure Boot on Twilight (my laptop). It works well, but the ArchWiki's documentation was a little confusing to follow, so I wrote this guide that targets GRUB. I have changed my setup significantly and I'm using systemd-boot now, but I'm leaving this here in case someone else finds it useful.
1011

11-
About a week after I wrote this guide I had the brilliant idea to switch to systemd-boot and also reconfigure my system to boot from a unified kernel image (UKI). This actually greatly simplified the process of encrypting the root partition since the UKI gets placed on the ESP after being assembled, thus I didn't need to worry about the bootloader being able to access `/boot` since the UKI is on the ESP (which is where the bootloader is installed to as well). I also worked up enough courage to directly modify the Secure Boot database so I could eliminate shim from my setup. So for my purposes at least, this guide is no longer relevant. But I'm leaving it up in the hope someone else finds it useful. :)
12-
13-
## Introduction
14-
15-
Welp guess what? Last week I set up Secure Boot on Twilight, my laptop. It works pretty much fine, the only real issue I had was a skill issue and the documentation on the ArchWiki being kinda messy and spread across a few different pages. This page is supposed to fix that issue at least for GRUB users.
12+
<!-- excerpt -->
1613

1714
Its always slightly bothered me that my systems (especially my laptop) aren't really that secure (I'm not joking, you get full access to them simply by booting up a live Linux image and mounting the internal drive and then you can do basically anything) so I'm taking some steps to *minimize the risks*. This basically just boils down to 1) enabling Secure Boot so only trusted OSes (and Windows) can boot, and 2) encrypting the internal drive so that you can't mount it in a live environment without knowing the secret to unlocking it. I've done Secure Boot first since it's the simpler option to implement and also fairly low-risk (the worst that could happen was nuking my bootloader and that's not that hard to fix).
1815

0 commit comments

Comments
 (0)