3 ms·
It is completely fine that NixOS is not reproducable for me. I personally switched(from arch) because my old setup was very finicky(eGPU + optimus on the go for
by petterroea 2y ago
It is completely fine that NixOS is not reproducable for me. I personally switched(from arch) because my old setup was very finicky(eGPU + optimus on the go for iGPU) and i was sick of random updates bricking stuff. I'm becoming too old to enjoy spending an hour+ tinkering with stuff that suddenly broke. Now it is hard to imagine going back. I just enjoy that applying all my customizations is a single action.
But Linderud has a good point, and I think a community like HN is rightfully interested in busting myths like this. I didn't know how the hashes worked, I haven't needed to have a relationship to them. But now I do!
- 1oooqooq 2y agohow exactly does nix prevents updates from breaking your system? arch is as close to upstream as possible, so you're not updating from upstream either... are you just... not updating?
- mrslave 2y agoIt's more like the whole upgrade is either successful, or it is not, and you are not left in an indeterminate state. E.g. A depends on B. In a large update, B updates, something unrelated fails to install and the update fails, and now A doesn't run because it wasn't upgraded and the still installed old version of A depends on the no longer available previous version of B. In NixOS, you either enter the new environment with all packages updated, or you don't. In the situation where you discover run-time - not install-time - errors, you can simply roll back to the previous set of packages. If the new packages cause a system crash, you can enter previous states from the bootloader. Now none of this magically solves the software defects themselves. But it gives you a consistent system state that can be transactionally upgraded, or reentered at any time. And then you can raise the appropriate bug tickets. Your system configuration is in a single file and the need to reconfigure different services in a particular order is gone. Also your dependencies are all nicely pinned with Flakes. This makes importing arbitrary dependencies - open-source or proprietary - a breeze. This has removed any previous appetite we had for a monorepo, which was primarily to ease access to our other libraries. It's all very nice, once you are over the not insubstantial learning curve that is.
- 1oooqooq 2y agoi guess i cannot imagine the kind of problems you were having before :) but from the description they seem runtime errors. do you have a functional test of sorts after nix creates the new state?
- mbrock 2y agoLook at Debian's official instructions for how to upgrade to a new major release. The wiki page begins with this casual disclaimer: "DANGER!!! DANGER!!! DANGER!!! DANGER!!! DANGER!!! DANGER!!! DANGER!!! DANGER!!! DANGER!!! DANGER!!!" The release notes for each version has the detailed instructions for how to upgrade from the previous version. They very strongly emphasize backing up the entire system, because the upgrade process is absolutely not guaranteed to leave the computer in a state that works correctly or boots at all, and there is no way to undo it. That's what's different about NixOS: if the new configuration doesn't work properly, you can just choose the previous configuration in the bootloader menu. It's as straightforward and foolproof as switching to another branch in a Git repository. The whole point of NixOS is that you can have any number of system configurations in the Nix store and switch between them in a way that's atomic in the transactional sense. If you know how Nix works, you can feel safe turning off the power supply at any point during a full system upgrade. You'll never end up in a state where half of the packages are upgraded. It's either upgraded or not. As far as I know there's no other distribution that works like this other than GuixSD.
- JamesSwift 2y agoNixOS supports adding tests which are selenium-style integration tests run on VMs
- pdimitar 2y agoYes, the updates treated like a DB transaction are the main draw of Nix and I agree they're nice. However, Fedora and recently Manjaro started offering the so-called "immutable" versions that do nearly the same: you can install and delete and do whatever you like but you also have to explicitly opt in to commit those changes to your bootable image. If you don't do it they're just discarded after you reboot. That's quite awesome and saves me from 99% of the problem you described... without having to learn the Nix's weird language or be willing to read cryptic error messages and get roasted on Reddit for not knowing them by heart.
- yjftsjthsd-h 2y agoYou can update both of them, but Arch breaks then you have to figure out how to manually roll back the packages that broke it. If NixOS breaks, you reboot and select the previous generation and it's all reversed for you.
- 1oooqooq 2y agomaybe you want manjaro (week late arch) and dual root.
- yjftsjthsd-h 2y agoHas anyone implemented A/B root on Arch or a derivative?
- RandomThoughts3 2y agoIf your filesystem is btrfs, you can use snapper and a pacman hook to do something equivalent but using less storage. See https://wiki.archlinux.org/title/Snapper https://wiki.archlinux.org/title/Snapper
- llm_trw 2y agoUpdates are reversible and you have a list of every update you have ever tried to revert to.
- JZL003 2y agoNot quite the same but very useful for me. Sometimes small patches to programs have big usability wins. In nix you can still update automatically, it adds your patch, automatically downloads the programs needed to compile (but still can be garbage collected afterwards), compiles and done Maybe not great for production but for personal use, since I guess this patch could break. But in exchange for a few times it breaks, I get automatic patched updated (Except for emacs where takes 40 minutes to compile, but schedule updated for night)
- petterroea 2y agoMy general experience with Arch is that the up-to-date-ness is a double-edged sword, and you some times hit new bugs or incompatabilities. If it happens in nix i can simply just revert - you can select which OS build version you want to boot at startup - and wait a few days. And for my eGPU setup it also gives me a lot more confidence to tinker and reboot - the barrier for me to do so is a lot lower when I know i can simply boot an older build of my OS instead of having to whip out the arch installer USB and arch-chroot into my root drive to fix a bricked install that no longer boots.
- aitchnyu 2y agoThere is a Utopia of rolling release and Snapper/Btrfs which takes a snapshot of / each time you use your package manager so you can roll back. But SpiralLinux(can be Sid based, Snapper OOTB) was infuriating with my Nvidia/5k screen and Cachy(Arch based with Calamares) didnt install. I'm too lazy to do it with a major distro and I download prebuilt debs/rpms and dont want to fight Opensuse Leap which invented Snapper.
- EasyMark 2y agoI understand your point of view, but I’ve been using Ubuntu LTS for over a decade and the only time it has broken on updates was hardware failure. I tried nix, but there is just too much to learn just to install an OS. If I needed 99.9% reproducibility I would go with it I guess but what I’m doing works for me and I don’t have to learn a whole new DSL just to install an OS
- dqv 2y agoIdk, in terms of installation difficulty NixOS is about the same as any other distro I've installed. The process is roughly: boot the LiveCD, verify disk config, run nixos-generate-config, add some basic packages to configuration.nix, run nixos-rebuild switch, and restart. The first time I did it, I didn't even understand the most basic aspects of the language.
- RandomThoughts3 2y ago> add some basic packages to configuration.nix This includes understanding how nix configuration works, finding the packages you want, understanding how their configuration is mapped in to nix idiosyncratic way of configuring software which is not well documented, will most likely require you read the package and map yourself between the software doc and what nix changes, then properly structuring the config before applying it. This is not in any way simple.
- petterroea 2y agoI agree. If all you need is Linux on a bog standard machine and would rather spend your time doing something else than tinkering on your OS, nix is not for you. Life is short and there are lots of things to do - we all have different priorities.
- xfer 2y agoI pressed C-c accidentally during the upgrade(wrong terminal) and it broke the entire system(had to manually change a few files rebuild initramfs to be able to boot). I would take the complexity of Nix without a thought.
- rowanG077 2y agoThis is my reason as well. Except it was with Ubuntu. The straw that broke the camels back was that on the day of a uni project deadline an Ubuntu update totalled my system. So I went all in on NixOS. There are a ton of things to complain about but my system has been rock solid since. I won't ever look back.
- dizhn 2y agoI know it's not the same thing but I am quite happy with opensuse tumbleweed and snapper snapshots. It won't save you from something that also breaks grub but for most everything else it'll be fine. I've only needed to revert to an earlier snapshot once (in 4+ years). I said I needed to but I didn't because I forgot I had the ability and fixed the issue in another way. (It was just having to download and install a wifi rpm without actually having wifi. Not a big deal.)