Add: homelab: apprentissage à la dure
This commit is contained in:
parent
461907638f
commit
e5e6f8d477
2 changed files with 79 additions and 0 deletions
39
content/posts/homelab-apprentissage-dur.en.md
Normal file
39
content/posts/homelab-apprentissage-dur.en.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
+++
|
||||
date = '2025-09-29T20:13:40+02:00'
|
||||
draft = false
|
||||
tags = [ "nixos", "self-hosting" ]
|
||||
title = 'Homelab: Learning the hard way'
|
||||
+++
|
||||
|
||||
Spending the weekend with family, I took the chance to check whether I could still access my various sites and services from outside. Feeling pretty good after that success, I thought—why not set up rtorrent through ProtonVPN on the server?
|
||||
|
||||
## The Beginning of the Screw-ups
|
||||
|
||||
Naturally, it wasn’t going to be straightforward. Natively, it’s already messy, but with NixOS? Utter chaos. So I turned to an AI, hoping for some explanations, and started blindly pasting random commands it spit out whenever an error showed up. Of course, nothing ever worked, and even worse, I had no clue what I was actually doing. In situations like that, you can smell disaster coming a mile away.
|
||||
|
||||
And sure enough—that’s exactly what happened! Boom, the whole network broke. No more outside access, sites and services down, just the big blank page of doom.
|
||||
|
||||
No problem, I thought—let’s just ssh in and fix the mess… except, nope, I had closed my session, and ssh was now dead too. And that was it. Game over for the weekend, I’d have to wait until I got back home.
|
||||
|
||||
## NixOS to the Rescue
|
||||
|
||||
End of the weekend, I get back home, plug a screen into the server, and hook up a USB keyboard. And here’s where NixOS really shows its magic.
|
||||
|
||||
- I reboot into an earlier generation with no issues.
|
||||
- I remove rtorrent.nix and another imported file.
|
||||
- I rebuild and reboot.
|
||||
- Once it comes back up, services are running again. All that’s left is a bit of cleanup in the Git repo.
|
||||
|
||||
## Lessons Learned
|
||||
|
||||
This whole thing could be a chapter of “self-hosting the hard way.” You always learn best the hard way, don’t you? So, to sum up:
|
||||
- Don’t mess with configs on weekends—and absolutely not the networking part.
|
||||
- Keep Git up to date so you can roll back easily; it makes git reset a lot simpler.
|
||||
- NixOS is insanely useful when it comes to fixing your screw-ups in no time flat.
|
||||
|
||||
## Resolutions
|
||||
|
||||
Beyond the obvious—stop making critical changes when I don’t have physical access to the machine—I think I’ll set up a method to build NixOS VMs directly from my flake directories, just to test out some configurations. At the very least, I’ll create separate branches for experiments, so I can always rebuild from master if needed. Way simpler in the long run.
|
||||
|
||||
In short, NixOS gives you huge flexibility. Might as well take full advantage of it, right?
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue