3 ms·
> When the new configuration finally builds, more ofen than not some component randomly stops working after reboot Good thing you're using NixOS where rolling
by craftkiller 7mo ago
> When the new configuration finally builds, more ofen than not some component randomly stops working after reboot
Good thing you're using NixOS where rolling back to a working version is as simple as a reboot, instead of Arch Linux where your options are:
1. If it's a boot issue, dig out a live USB for recovery
2. If it's a package, try rolling back piecemeal by installing old versions from /var/cache/pacman
3. Once rolling back piecemeal breaks your system more because of the mixing of package versions, pin your packages to a specific day in the arch rollback machine and pray your whole system downgrades cleanly
I used to live that life. After a couple failed downgrades I started exclusively using the arch rollback machine for my work machine so nothing would update and break before I had a chance to test the updates on my personal machine.
> Huge update sizes
Yeah, the optimize store option to replace duplicate files with hardlinks really should be a default, and automatic nix garbage collection should probably be put in the initial automatically-generated config so new users are aware of it. Also `nix-collect-garbage -d` behaving differently from `sudo nix-collect-garbage -d` despite being a trusted-users was quite the surprise.
I used to be able to brush this off by "storage is cheap" but AI has driven up the cost of SSDs.
> In contrast, Arch Linux simply downloads prebuilt binaries via pacman or an AUR helper
That is also the case on nix. If you are compiling software yourself, then you must have changed some settings to cause it to build from source, which is not even an option on Arch Linux. Nix having the completely optional ability to customize your packages is a positive, not a flaw.
> why not use Gentoo Linux instead
On nix my entire system is defined in my nix config, including all my settings, all my scripts, and all my packages. I use impermanence to wipe my disk on every boot except for the a handful of folders that I tell it to preserve across boots. The combination of those two creates a deterministic system. Nix is so much more than just being able to compile your software.
- akimbostrawman 7mo ago>Good thing you're using NixOS where rolling back to a working version is as simple as a reboot, instead of Arch I feel like Nix user always leave out that you can simply use a filesystem with snapshots like btrfs or ZFS and gain the same resilience against possible breakage and even beyond just update issues.
- vrganj 7mo agoYeah if my arch breaks, i just reboot into a snapshot. It's not a problem, really.
- craftkiller 7mo agoSo I do run ZFS with automatic snapshots through zrepl, but I think a shortcoming of relying on that on Arch Linux is your user data. If the issue is immediately apparent after an update, then you absolutely can just roll back and be fine. But if it takes you a week before you discover something isn't working, then rolling back isn't as straight-forward because you're potentially losing any modification to your files made in the past week. You could partially mitigate this by storing your $HOME on a separate dataset, but not everything ends up in $HOME (for example, everything related to docker, your secureboot stuff, your bluetooth pairings, your wifi networks, lvfs, journald, your systemd timer statefiles) On NixOS my user files are completely separate from my programs/system files. I can roll one back without impacting the other. This is further guaranteed by impermanence which wipes my disk on every boot except for the folders I specify should be preserved, all of which end up storing their data under a separate ZFS dataset through bind mounts. So programs/system files are read-only under /nix and my user data is under /persist and bind-mounted to wherever I need them. So I am 100% certain that none of my user data is comingled in the same dataset as my programs/system files.
- akimbostrawman 7mo agoIts true that with datasets there can be edge cases like /etc/ but the overwhelming majority of issues are apparent on first boot, anything else can be separately backuped up for a rollback or just fixed with troubleshooting.