19 ms·
Welcome to the honeymoon phase. Mine lasted about a year. Eventually you will have to leave the comfortable area of "those who have done it before" and engage w
by sepositus 1y ago
Welcome to the honeymoon phase. Mine lasted about a year. Eventually you will have to leave the comfortable area of "those who have done it before" and engage with some long, unwieldy, mostly undecipherable stack trace.
When I asked a long-time Nix vet why he thinks people leave, he provided the most insightful answer I've seen yet: they just don't try hard enough.
- atrus 1y agoWhy is it inevitable that you have to leave the comfortable area of "those who have done it before" though? Most of the benefit of nix for me is maintaining a configuration for a couple computers in a way that's easy to backup, upgrade, and recover with.
- sepositus 1y agoFor reference, I use Nix to manage three different machines, always via home-manager and nix-darwin (I left NixOS awhile ago and haven't looked back). I don't think it's "inevitable" that you'll hit the difficulty wall, but certainly likely. As an example, I was recently playing with Pyinfra which is like a pure Python version of Ansible. It turns out that one of the dependencies uses an archaic version of setuptools and the package owner had inserted some _very_ hacky code that ended up breaking on two of my systems. Now I'm relatively experienced with Nix, so it took me a few hours to track down, but it would have been days if not impossible for a beginner. Nowadays I package brew along with my machines and as soon as something smells funky in Nix I just manage it with brew. Much more peaceful.
- nextos 1y agoI think Nix is getting an unfair reputation for being too hard. Simple things are IMHO simpler in Nix than in any other distribution, and what one needs to know to accomplish them is tiny. It has basically reduced my sysadmin maintenance tasks to zero. In case of regressions, Nix makes it trivially easy to go back in time 2 or 3 years, cherrypick some packages and install them, or change your entire desktop environment, and then go back to the previous state with no effort. Nix is hard if you need to build something difficult to package or something that has very unusual or dirty build processes. If you need to that regularly, Nix is not worth the effort unless you are an organization that values reproducibility and is prepared to pay for its cost upfront. If these particularly messy usecases are something that you don't encounter so frequently, you can always use an escape hatch to be able to make your install impure. For instance, distrobox is quite convenient to run e.g. an Arch or Ubuntu container. In my case, this has been helpful to run Julia, whose Nix packages are quite brittle.
- davidcox143 1y agoI've been using Nix and NixOS since 2022. I can't imagine not using Nix at this point and agree that the reputation for "being too hard" is not quite accurate. Nix is different - that's the point. The learning curve is a thing, although I'd argue that it's nowhere near as steep as the tools many of us use every day (C++, Rust, AWS/GCP, etc.) Nix's "difficulty" IMO comes from defaults that are not sane and a split community. For example, if you use the official Nix installer, flakes are not enabled by default (despite being widely used [1]), but they are if you use the Determinate Systems Nix installer. Flakes are realistically the only way to obtain the benefits that motivate learning Nix (deterministic pure builds, fine-grained control over dependencies) and are the "primary driver of Nix's adoption" [2]. AFIK there isn't a viable alternative to flakes other than maybe atoms [3], which are relatively new (like "lock files are totally hand made" new [4]). Yet, the official Nix stance on flakes is to wait... for... what? For a day-in-the-life look at more of Nix's rough edges, I posted some rambles here [5]. [1] https://x.com/d4r5c2/status/1896415101386928539 https://x.com/d4r5c2/status/1896415101386928539 [2] https://x.com/grhmc/status/1896551138104844389 https://x.com/grhmc/status/1896551138104844389 [3] https://x.com/nrdexp/status/1925892763301695978 https://x.com/nrdexp/status/1925892763301695978 [4] https://x.com/nrdexp/status/1925707692447871283 https://x.com/nrdexp/status/1925707692447871283 [5] https://youtu.be/TwVamLq5OHY https://youtu.be/TwVamLq5OHY
- codethief 1y agoDo you have a link that explains what atoms are? This is the first time I'm hearing about them.
- davidcox143 1y agoSort of. There’s a summary by the author of atoms in the Twitter thread linked above. They also link this very lengthy blog post: https://nrd.sh/blog/atom-anatomy/ https://nrd.sh/blog/atom-anatomy/ My understanding of atoms compared to flakes is that they 1) add toml 2) provide a more precise way to reference remote src. The author also claims performance benefits. I haven’t used them personally and can’t speak to their stability or ergonomics.
- exe34 1y ago> Welcome to the honeymoon phase. Mine lasted about a year Mine has been going on since 2016, what am I doing wrong?
- sepositus 1y ago> they just don't try hard enough The answer was in my post. Nix isn't for everyone, and that's OK.
- myaccountonhn 1y agoI've returned and my new approach was to learn: 1. The repl for exploration 2. The language (read nix.dev) 3. Read the nixos manual And with that it started to make sense.
- exe34 1y agoI've actually gone the other way - not everything is meant to be run. If it's not in the nix repos, I'll try the fhs, and if that doesn't work - well I probably don't care enough to beg it to run. For me the fact that my base installation can never break is not negotiable. I definitely didn't learn much of nix(os|pkgs). I never bothered learning about flakes. I just have a configuration.nix and a user config.nix, and a "fhs" default.nix and that's it.
- packetlost 1y agoBeen there. Powered through it. It gets easier when you actually read the Nix manual.
- kstenerud 1y agoBeen there. Powered through it. Read the manuals. Stuck to it for a year before asking why I was behaving like a masochist. Now I use Debian and LXC and docker.
- microtonal 1y agoNix Pills are probably the best way to get a deep understanding of Nix and some underpinnings of nixpkgs. I read the pills when I started using Nix in 2018 and never had much difficulty understanding the language or most of nixpkgs.
- packetlost 1y agoThe biggest thing I've hit is linking issues with Rust -sys crates (ie. C/C++ libraries wrapped). There's some very strange behavior if you include gcc and clang (for example) into the same environment. My biggest issue with Nix tbh is it adds an annoying step to every random repo I want to clone and build.