8 ms·
After a lot of hesitation and energized by a work incentive, I tried Nix last week. I've followed the official docs, had to resort on Google et al. quite quick
by ocimbote 4y ago
After a lot of hesitation and energized by a work incentive, I tried Nix last week.
I've followed the official docs, had to resort on Google et al. quite quickly to solve mundane problems (installing a channel is not on the default path of the docs for the new learner), and after much wandering and trial and error, I evenrially went to the discourse and asked what I should use between flakes, nix shell or develop... Every single answer was 1/extremely informative and nice 2/ crystal clear that Nix was in a confusing, in-between stage in its life cycle.
I very much appreciate the community and efforts but I work for a company that cannot afford the commitment that Nix requires right now. I will happily come back in 2 years and reevaluate.
- Buttons840 4y agoWhat exactly are they in-between? What is changing and how will things be better in 2 years?
- rgoulter 4y agoThe Nix Flakes feature. Previously, Nix installed its packages using 'channels'. You would add and update a channel, and then you could install packages from a channel. (This is roughly analogous to apt repositories). -- The CLI user experience for this channel-based approach is pretty terrible. Nix flakes are a new feature where a project has a `flake.nix` file, which follows a standard format for declaring what packages a project provides. -- The CLI experience is much nicer, and has several other benefits over pre-flake Nix. Flakes are still (for various reasons) labelled as "experimental". Much of the documentation has not been updated for flakes. In 2 years, you'd hope that: the documentation improves, and there's less friction for adopting the technology.
- ocimbote 4y agoMy most personal example of the CLI being in-between state and the community agreeing to it is in this thread: https://discourse.nixos.org/t/nix-shell-nix-shell-and-nix-develop/25964 https://discourse.nixos.org/t/nix-shell-nix-shell-and-nix-de...
- shepardrtc 4y ago> Nix was in a confusing, in-between stage in its life cycle That's what everyone says about software that is just too complex. I tried Nix for the first time yesterday and had a similar experience - it was just too buggy, too brittle, and too difficult. It's absolutely not worth it. The software was built to solve a difficult problem, and maybe it does that, but it became a difficult problem in itself. For example, if you Ctrl-C while its downloading an update, you get in a weird state where nothing works. Ok, so just uninstall and reinstall right? Well, there's no uninstall. You have to manually delete everything and remove the /nix mount. Its 2023, why am I having to hunt all this down? Sure, if you reinstall it it tries to do that, but it fails every time, or it just misses things. I just don't have time for this. Nix is not even close to ready for production.
- one-punch 4y ago> For example, if you Ctrl-C while its downloading an update, you get in a weird state where nothing works. … There is a new Nix installer from Determinate Systems, a company heavily invested in Nix, which should make installing Nix more atomic, reversible, and thus easier: The Determinate Nix Installer https://news.ycombinator.com/item?id=34957953 https://news.ycombinator.com/item?id=34957953 And after getting pass the installation, Nix is great for production.
- lostmsu 4y agoThe parent talks about an interrupted update process.
- Filligree 4y agoInterrupted updates don't do that. In single-user mode you could maybe ctrl-c it during the final activation phase, but that's a small fraction of a second -- it's just replacing a few symlinks. In the default multi-user mode, you can't even do that.
- deleted 4y ago[deleted]
- tomberek 4y agoI am working on the Nix project; resolving this "in-between stage" is our highest priority at the moment. I'd like to better understand two independent things: 1. What were the drivers and motivators for you to try Nix? What did you hope to achieve? 2. Was the current experimental status of the new nix CLI and flakes the primary cause of the confusion?
- ocimbote 4y agoThanks for your interest, it really confirms the interest I've received from the community in general. 1. I'm leading some Platform Engineering projects at my company and one is focused on Developer Experience. We have a wide variety of configurations on the engineer's laptops and the development environments are not normalized. That causes a lot of noise and pain, as one knows. Nix is, or seems to be, an opportunity to take back control on how engineers run the applications locally. 2. I'd say it has many factors. The official documentation and guides are not yet suitable for a zero-knowledge newcomer. As an example, since channels are still recommended in the docs, the command to add the default channel is not in the "Install" page. Things go from `curl <(...) | bash` to `nix-shell`, and it fails (on a M2 Mac) unless I navigate somewhere else on the docs to find that I should add the default channel first. Second point is about the terminology. Derivation, Flakes... are quite arcane terms. At least to the layman (me). Third, community blogs etc are covering outdated versions, some rely on flakes, others not, it's understandle but also understandably disorienting, especially when you're after some guidance that the official docs could not provide. Fourth, the API. `nix-shell` is not a shortcut for `nix shell`. Wait what? --- When I'm saying I'll come back in 2 years, I mean that it is clear that the situation is changing rapidly and dust needs to settle. Maybe the direction is not clear yet, and that would be fine. My one and only advice would be to only ship a feature that is properly documented. Reading something like "We recommend to use flakes, they're the future, but the APIs are in flux, but if you're wary and want stability, here are our stable APIs" would have saved me a ton of time.
- jen20 4y ago> take back control on how engineers run the applications locally. How to piss off engineers in one statement. Developer machines are not something for you to “have control” over.
- colordrops 4y agoThe people you are talking to are either being too modest or are overly picky about what "ready" means. Flakes are 100% the way to go for new users and are production ready. They work well.
- jon-wood 4y agoAs someone who recently picked up Nix and isn’t using flakes the reason for that is that none of the official documentation seemed to be saying it was a good idea, and all I could find to the contrary was random blog posts, none of which actually explained what on Earth a flake is. I think I vaguely understand them now, but I’m hesitant to rip out the setup I’ve eventually got to and replace it with the new hotness just for the sake of it.
- colordrops 4y agoIt is pretty old for being the "new hotness". It allows me to idiomatically and completely encapsulate my system declaratively in config. Nix isn't complete without this IMO.
- Nullabillity 4y agoYou could do the same before with Niv. The new flake.nix format is pretty awful too (why do I need to declare every supported target triple separately?!).