2 ms·
Can't speak for everyone, but at least in my case, especially when I was first learning about Linux, I'd mess up stuff with my graphics card driver or wifi card
by tombert 2y ago
Can't speak for everyone, but at least in my case, especially when I was first learning about Linux, I'd mess up stuff with my graphics card driver or wifi card driver or something, and I'd get to a state where stuff wouldn't boot, or a GUI wouldn't start up. I'm decent enough now to where I'd be able to fix it, but when I was starting out I would sometimes feel that I had to wipe the hard drive to get it working (particularly before I had a smartphone, so when the WiFi went out I really had no way to look up how to fix it).
NixOS is nice because if you get to a situation like that, you can simply reboot and choose a previous generation, and then figure out where you went wrong.
- mixmastamyk 2y agoOk, so like filesystem snapshots. However, since LiveCD/Flash images became a thing, I stopped worrying about the OS at all, just keep a recent backup of my /data partition.
- tombert 2y ago> Ok, so like filesystem snapshots. Sort of, but only sort of. The filesystem is actually (mostly) unchanged for the backups. You have the /nix partition that can only really be touched by the nix program itself, and you have your root partition built based on the manifest defined in your configuration file. As such, every time you want to change anything about the system, you "rebuild" it, it stores a "copy" of the old root system, but since it's a cool lazy functional thing, it really only stores the diff's from the configuration, so they aren't terribly expensive, so it's not weird for me to have literally hundreds of generations stored on my laptop. Old stuff in the /nix partition isn't deleted until it's garbage collected, and a lot of stuff can't be garbage collected until the generation attached to it is removed. So it's like a filesystem snapshot, but only the system files itself, the actual stuff on the hard drive actually doesn't get touched. > However, since LiveCD/Flash images became a thing, I stopped worrying about the OS at all, just keep a recent backup of my /data partition. I actually kind of do that with NixOS too! My root partition is a tmpfs mount, meaning that every reboot is effectively a fresh root [1]. I have persistent volumes for my home directory and a few other things. To quote a friend, it's like a "new car smell on every reboot". [1] Followed this tutorial: https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/ https://elis.nu/blog/2020/05/nixos-tmpfs-as-root/