NixOS + Framework | 233 Members | |
| Discussing NixOS in the context of the Framework laptop | 52 Servers |
| Sender | Message | Time |
|---|---|---|
| 10 May 2026 | ||
| uh, no clue | 16:33:59 | |
| what you're looking at was actually manually partitioned back in the day | 16:35:11 | |
| Having swap also crypted in the same luks container is the main benefit for me (ignoring swap files). | 16:37:10 | |
well, yeah. /swap for me is just a btrfs subvolume and my swap space is a swap file conveniently at /swap/file | 16:37:33 | |
| disko configuration that i wrote recently but haven't used to reformat my in-use disk (because i haven't bothered migrating) is:
| 16:38:46 | |
| Also, moving stuff by adding a pv to lvm and removing the old pv is also nice (although I never used it). (you can also do this using btrfs native multi-disk support) | 16:39:12 | |
this is how i'll be migrating this machine's disk to a new disk, with the above disko configuration. | 16:41:08 | |
| I have another impermanance setup, where I move the root submodule to a subfolder (for crash recovery), and delete the ones that are too old. | 16:42:41 | |
| my impermanence module (referenced in the above config) just sets up the i'd be interested in seeing your crash recovery setup. | 16:47:42 | |
| * my impermanence module (referenced in the above config) just sets up the i'd be interested in seeing your crash recovery setup. | 16:48:11 | |
| * my impermanence module (referenced in the above config) just sets up the i'd be interested in seeing your crash recovery setup. | 16:48:22 | |
| or do you simply mean that instead of deleting the root subvol on boot (like i do currently), you create another snapshot of it | 16:50:58 | |
| I have this version (https://git.sr.ht/~albertlarsan68/dotfiles/tree/main/item/nixos/scripts/root-reset.sh) that snapshots the root before rolling it back (with a failed attempt at preserving nested subvolumes). It runs after hibernation resume and before mounting sysroot. .The modern version (for the new machines) is at https://git.sr.ht/~albertlarsan68/dotfiles/tree/flake-parts/item/nixos-modules/impermanence/rollback.sh and literrally mvs the /root submodule to a dated folder, then deletes old versions. | 16:52:53 | |
| The modern version does properly save nested submodules | 16:53:46 | |
| got it | 16:55:18 | |
| i don't care about preserving the root subvol. that's the whole point of impermanence, after all :) | 16:55:42 | |
this snippet is from the systemd unit that runs in initrd before sysroot, and just unconditionally deletes the subvol and restores it from the blank snapshot (this is taken at disk formatting time; the above disko config handles this with a | 16:58:38 | |
| Saving the old snapshot saved me more than once, when my computer crashed, I could mount the old snapshot and recover some files that way. | 17:07:27 | |
| That is why I only keep the latest boot on old version and the last 1 day of boots for the modern version. | 17:09:33 | |
| makes sense | 17:11:03 | |
| sudoforge: how do you specify the swapfile for resume? | 17:29:05 | |
| https://search.nixos.org/options?channel=unstable&query=resumeDevice#show=option%253Aboot.resumeDevice | 17:30:20 | |
| see also:
| 17:32:42 | |
| For a file offset is needed it seems. | 17:39:13 | |
| yes | 17:42:54 | |
| Also why I don’t bother with swapfiles, only a swap partition | 17:43:49 | |
| Don’t have to find the offset (and make sure btrfs doesn’t break the file) | 17:44:14 | |
| for sure, a swap partition is simpler | 17:44:18 | |
| trumee since you seem newer to all of this i'm going to recommend that you use a swap partition | 17:44:39 | |
| make it a little bigger than the RAM you have on the machine (or the RAM you plan to have on the machine) | 17:50:56 | |