this post was submitted on 05 Aug 2024
8 points (100.0% liked)
Nix / NixOS
1739 readers
1 users here now
Main links
Videos
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Edit: I missed some complexity as suspected! I'm not sure how this process would handle hard and symlinks. Would add an experiment for that before going with the nix and root folders (it shouldn't harm log at all).
Original text: Perhaps I'm missing some complexity in your setup but from my understanding it's really straight forward:
The main caveat is that you need twice the space of your largest future sub volume. A garbage collect - d and any manual cleanup can help you there. I'd gets that approach with /var/log and when that works move over to the more critical systems.
If everything is working as expected, write a run book for every step and repeat with /home (i.e. have every step written up). Home is the second least critical folder for this.
Once you have your runbook repeat the process and when you run out of space resize as needed. (e.g. https://btrfs.readthedocs.io/en/latest/btrfs-filesystem.html#man-filesystem-resize)
That said: as you aim for the fully ephemeral root I personally would actually go the reibstwllwtion/reinstall route and write up everything I needed to do by hand. But that needs even more spare space (I'd prefer even a second disk for stuff like that to have a fallback).
Good luck!
Thanks for your response.
That's exactly what i had in mind. I just wasn't quite sure it would work out as i imagined.
Since i asked this question i have already prepared a second (empty) disk and a disko config to make it all declarative. Before i actually apply this config to my second disk i'm looking into creating a VM to test the disko-partitions