gay robot noises

I forgot my full-disk encryption password :(

There wasn't any data loss, but it wasn't exactly a fun time.
date:
1232 words
CLEF DESTRUCTION

I use full-disk encryption on my laptop because I'm a bit of a control nerd like that. And I didn't write down the password anywhere because that meant that anyone who got that password would probably also be able to get my laptop. Finally, I had a shorter password for my user account since I type it frequently (sudo, unlock screensaver, etc). Which worked fine... until I had a month or so where I never turned my laptop all the way off. And then when it finally ran out of power and I turned it back on, I realized I had no clue what the password was any more. Shit. I tried everything I could think of in every variation, and it didn't work.

Fortunately, I have daily backups at 4 AM via borg running in a systemd timer, both to a server in my office and to rsync.net. And I hadn't used the laptop all day, so my data would still all be there.

Unfortunately, those backups are also encrypted using a passphrase that I store in a file on my laptop, and I never even bothered to memorize it. I thought I wrote it down, but it wasn't in any of my usual "important documents" locations.

Fortunately, that keyfile is stored in my nixos-config git repo, which I push fairly regularly to codeberg.

Unfortunately, it's encrypted using agenix to my SSH key (because storing unencrypted secrets even in a private repo is a terrible idea), and the SSH key wasn't backed up.

Fortunately, it was also encrypted to my SSH key on my old laptop, whose password I did mercifully remember. And I was able to plug it in, turn it on for the first time in months, and borg mount the local copy of my backups. And since my NixOS config is in source control and I'd recently pushed it, I knew I'd be able to recover all my system configuration. So I borrowed a USB drive, wrote the NixOS minimal installer ISO to it, and flattened the drive.

Lessons learned

I don't get to do post-mortems much, so I figured I'd do one for this. :)

What went wrong

What went right

Some amusing mistakes I made

Other trivia

// α-5/h