6 ms·
I can do (almost) all of these things with a traditional Linux distribution, git, and a few scripts written in my language of choice, and I can do it faster. N
by cosmojg 3y ago
I can do (almost) all of these things with a traditional Linux distribution, git, and a few scripts written in my language of choice, and I can do it faster.
Nix seems more competitive with something like Conda or Spack than a traditional package manager like Apt or Pacman. Similarly, NixOS seems more suitable for deployment in containerized environments built on woefully outdated deps than personal dev setups with generally higher security requirements.
I've experimented with both Nix and NixOS, and while I adore both the beautifully functional language and the endlessly helpful community, I haven't been able to justify the overhead of maintaining a nix.conf, flakes or no flakes, on top of everything else I need to do on my machines. I kept running into issues where some program I needed wasn't already integrated with the Nix way of doing things or something that worked on my Linux setup failed to work on my macOS setup despite multiplatform guarantees.
Nevertheless, I wait with baited breath for the day that Nix replaces Conda among a critical mass of practitioners in my field. I've tried getting a few of my teams to switch (with help from Devbox and Devenv), but it's a struggle to get people to learn new things when their (often worse) way of doing things works well enough most of the time. Heck, I count myself lucky for getting some people to switch from the atrociously slow Conda to the significantly faster Mamba as even that was inordinately difficult despite for latter being a drop-in replacement for the former.
- zetalyrae 3y ago>I can do (almost) all of these things with a traditional Linux distribution, git, and a few scripts written in my language of choice, and I can do it faster. As someone who moved from a directory of numbered bash scripts and GNU Stow to Nix, I can't disagree more. The fundamental difference is one is imperative and the other is declarative (and reproducible), and that makes all the difference.
- indemnity 3y agoExactly. I have used Linux since 1994, from Slackware to RedHat to Debian to Gentoo to Ubuntu to Arch. NixOS and nix-darwin both using nixpkgs is the first time I have the exact same shell and programming/CLI environment on all five of my personal and work machines which run Linux and macOS. I upgraded them all to the 23.05 versions from 22.05 by updating my flake.lock and doing a rebuild switch on all machines. No regressions. Some cobbled together shell scripts and a Git home dir management system (yadm) is what I had before and it doesn’t come close. I also dreaded upgrades with the previous approach. And didn’t have nearly the same control pristine replicated environment across machines. It’s even flexible enough that on Linux desktop machines I have X11 and bspwm DE environment, on servers no X11, and on macOS it configures my system preferences, Dock icons and installed App Store apps.
- kevincox 3y agoReproducible is key here. I remember trying to manage servers with Ansible, Chef and Puppet in the past but was always disappointed that trying to spin up a new server, or move a service between two usually failed. This is because service S1 forget to declare dependency D, but it happened to work because S2 needed the same dependency and declared it. Or simply that in the past S1 declared D but the config was "cleaned up" and it wasn't realized that D was still needed. (Or it wasn't needed at the time but then needed again, but you didn't declare it). These types of problems are very rare in NixOS (although I do occasionally see it with the module system, but at least this is config dependent, not system-state dependent). If I apply the same config I have a very high confidence that I will get the same system. I lost my desktop's drive the other day and I was back fully functional within an hour. Most of the time was spent logging into Firefox, Email and various websites rather than installing the system. Managing servers is similarly easy, I would have a hard time moving to something else. Intrinsic state (like user data or application databases) is still hard, but at least that is the only real concern. Better than dealing with state and config.
- rgoulter 3y ago> Reproducible is key here. I like the terms this article used: Divergent, Convergent, Congruent. https://blog.flyingcircus.io/2016/05/06/thoughts-on-systems-management-methods/ https://blog.flyingcircus.io/2016/05/06/thoughts-on-systems-... In a 'divergent' system (e.g. managed by bash scripts), the resulting system state might diverge from what the bash scripts have, because of manually running commands on the system. In a 'convergent' system, the system tries to reach a target state by comparing what's there with what it's got. In a 'congruent' system, the system is forcibly built to equal the target state.
- temptemptemp111 3y agoYou guys keep saying this word "reproducibility" but I don't think you know what it means. Debian and Arch are more reproducible than NixOS.
- klysm 3y ago
- slabity 3y ago> I can do (almost) all of these things with a traditional Linux distribution, git, and a few scripts written in my language of choice, and I can do it faster. Is this hypothetical? Or do you have a link you can share? Many distros have been going through a difficult time just getting reproducible builds. To claim that you can do that (and more) on any traditional Linux distribution so easily is a bold statement.
- rowanG077 3y agoYou can build build bash scripts that roll out your entire system from a full set of source from the ground up in about 5 minutes? I doubt your keyboard could even registers keys fast enough to type all that out.
- klysm 3y agoAND it will be fully reproducible, idempotent, allow rollback, and be readable!
- tripdout 3y agoNix is also cross platform. I have a ZSH and NVim configuration from my NixOS laptop, and when I got a company MacBook, it was extremely simple to use that same configuration and get an identical setup.
- dizhn 3y agoThat's two dotfiles and two directories each for my setup, which i just rsync over if I feel like. Are you talking about installing necessary depencies or something? I can't think of a ton of examples but maybe a language server? Not that it's strictly part of nvim. Some details perhaps?
- pessimizer 3y agoAside: "bated" breath. It's one of those anachronistic words that's only survived by hiding in an idiom.
- klysm 3y agoI was thinking about words like this the other day - words that only occur in regular usage within a phrase. Such words sound odd when they aren’t used in their phrase. Of course I can’t think of any examples right now though
- antonvs 3y agoIt's an abbreviation of "abated", though, which is still in use.
- fnordpiglet 3y agoMany times I’ve horked my system and rebuilding wasn’t quite the next thing I wanted to do. I’ve got a nixos server that I use for my home server and I’ve screwed it up so bad booting was difficult. However it’s super easy to just switch to a prior state. That alone is worth it.
- colordrops 3y agoI'm sure you can, but the OP addressed this: > compared to other distros where discipline is required to maintain reproducibility You can do these things yourself, but it won't be standard, and it will be prone to error, and it will likely be inferior in many ways to a solution that is maintained and improved by countless people.
- kaba0 3y agoA quick Litmus test: can you install Gnome and KDE, uninstall them and not have any leftover package? None of your listed package managers can do that, and that’s not even a difficult thing like installing 2 firefox versions with only this deep dependency changed.
- dizhn 3y agoThe thing with traditional package management though, these decisions are not that straightforward, especially for mega packages like KDE or LibreOffice. When you install a window manager like say, sway, it will install a terminal, alacrity on some distros. The distro specifically refrains from deleting alacrity when you're uninstalling sway and that's a reasonable thing to do even though people might disagree on it.