Live data from Hacker News

Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

zero-to-nix.com

211–220 of 227 posts

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#211
post #24

Earlier quoted context omitted.

NO. He asked about Nix NOT NixOS... do not conflate them together. Nix an extremely generic tool for much much much more than what you have said.

Is Nix used for anything besides configuring a computer? I said "a lot more to it" as well...

Yes, its used to guarantee reproducible scripts (so, e.g., you can use `jq` and not require someone have jq installed and not require running through docker) and dev environments as well (which is really great for both version locking as well as polyglot projects).

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#212

Earlier quoted context omitted.

Is Nix used for anything besides configuring a computer? I said "a lot more to it" as well...

Yes, its used to guarantee reproducible scripts (so, e.g., you can use `jq` and not require someone have jq installed and not require running through docker) and dev environments as well (which is really great for both version locking as well as polyglot projects).

I use nix shell for development and reference uninstalled packages from scripts as well. I think we both understand what Nix is capable of. I still don't find any issue with my initial comment that Nix at its core is for maintaining a reproducible system from config files in git. My point wasn't to be pedantically perfect but rather to communicate a core use case in laymen's terms for the uninitiated.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#213

Earlier quoted context omitted.

> would love to see a discussion from somebody who really likes Nix on why it isn't ready for prime time yet The daemon needs to be run as root root in a standard multi-user install which rules out HPC-like envs where Nix would actually shine. There are workarounds but none of them official. Tooling and documentation are on the same level as for a random esoteric programming language. I love Nix but have been hesitan…

> There are workarounds but none of them official. But does it need to be official? Wouldn't that at the same time bloat nix even more? Isn't it enough if core people of the community for example build https://github.com/nix-community/nix-user-chroot ? > In reality the only easy way to get it done is to use additional non-foss software That is not true at all. You can use a nix docker image, a 5 line nix file and 2 c…

> You can use a nix docker image, a 5 line nix file and 2 commands to do a very basic CI pipeline almost anywhere.

Yes, if you don't cache the build results or manage that cache very crudely. Sorry, I wasn't precise enough.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#214
post #12

The same Zero to NixOS would be highly appreciate.

What are your thoughts on the section about NixOS?

Zero to Nix and its NixOS section is elegant and simple.

It has already been said many times but NixOS suffer from a poor and a fragmented documentation.

The Official Nixos Manual is a very good start to install Nixos. But that's it.

It does not explain all the logic behind NixOS for already experienced user. Because yes, Nixos is absolulety not for beginners !

Nixos is a kind of blackbox where once you've luckily found the site https://search.nixos.org/options it comes with all the options you were looking for.

You need a sysadmin background to understrand theses options like (ie: services.nginx.virtualHosts..locations..extraConfig). A reverse dictionary of how we used to do things with traditionnal distro and how to do with Nixos should be a very good start !

At least, the extrem big fucking issue is the complete mess between Nixos/Nix/Flake/Home Manager. Theirs documentation and definition are often "recursive dependant" in a way you are completely lost.

If i compare to AUR (ArchLinux User Repository), the learning curve to create a custom package is quite easy. For Nix, it requires an amount of concentration, reads and skills to do the same. This discourage users.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#215

Earlier quoted context omitted.

It may not be a fad, but there's a lot of rose-colored hype that masks a world of tedium. New prospective users should be prepared for a lot of uphill grind with respect to configuring packages or defining their own packages. Every time I try to do seemingly simple tasks in Nix, I end up spending hours on the Nix discord channel trying to work out a solution with seasoned users (who invariably struggle to work out a…

> MacOS is still a second-class citizen in the Nix world and a fair amount of stuff doesn't work properly In my experience: With fewer nix users on macOS, it's more likely you'll run into software which isn't in the binary cache, & so will compile from source. (brew also does this). With fewer nix users on macOS, it's may take longer for packages broken on macOS to be fixed. It's a bit more of a hurdle to use .app pr…

> With fewer nix users on macOS, it's more likely you'll run into software which isn't in the binary cache, & so will compile from source.

This isn't necessarily true, unless the package happened to fail to build on Hydra, or it just hasn't been built yet. (Every package is built for every platform that has builders in Hydra, it's not a matter of maintenance unless it just doesn't build.)

Does brew do this differently? I thought they also automatically compile every package.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#216
post #141

Earlier quoted context omitted.

I love Nix, all of my machines run NixOS, but I think it's 5-10 years out from widespread adoption. Currently the biggest issues have to do with severely lacking documentation, lack of developer tooling (missing things like LSP), very slow iteration cycles, confusing or impossible to understand errors, and even naming (Nix refers to the language, package manager, cli, community, etc). That said, right now it's still…

How would you compare Nix to Guix? https://guix.gnu.org/en/about/

New to both. In spite of significant interest and weeks of work, I can't even get Guix installed on bare metal on my Mac nor on my older Acer laptop (a converted chromebook) nor on a raspberry pi. New to Nix and have it running with hardly a hitch on all or these.

Reached out to Guix IRC and mailing list with no response (though one helpful HN commenter got back to me -- thank you, and I still need to respond!).

Nix community on the other hand has been extremely helpful on their discourse and has been remarkably welcoming to PRs and contributions in spite of me being a noob.

Will take another look at Guix in a year, it certainly seems to get many things "more right" IMO, but I can't validate that opinion if I can't get it installed.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#217

Earlier quoted context omitted.

Yes! Assuming that is what "using Nix" looks like for an expected use case, that would be informative for someone who does not know what using Nix looks like.

You will like nixos.org then :) https://nixos.org/ Lots of examples if you scroll down!

Oh this is completely and exactly what I was thinking of, thank you! :)

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#218

I would love to see a discussion from somebody who really likes Nix on why it isn't ready for prime time yet/just play devil's advocate aloud on why it isn't the greatest thing since sliced bread. I feel like I must not be doing anything "serious" enough to need package reproducibility at that high level. I'm aware of things like git checkout/tags, package-lock.json, Cargo.lock, Docker image tags. What is a real worl…

> What is a real world use case where Nix isn't overkill?

When you need to tie together code in two or more different languages. For example if you need to call an Node executable in your rust program. In that case neither npm nor rustup is enough since you need something to tie the two together. Nix is excellent for that in my experience.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#219
post #141

Earlier quoted context omitted.

How would you compare Nix to Guix? https://guix.gnu.org/en/about/

New to both. In spite of significant interest and weeks of work, I can't even get Guix installed on bare metal on my Mac nor on my older Acer laptop (a converted chromebook) nor on a raspberry pi. New to Nix and have it running with hardly a hitch on all or these. Reached out to Guix IRC and mailing list with no response (though one helpful HN commenter got back to me -- thank you, and I still need to respond!). Nix…

> I can't even get Guix installed on bare metal on my Mac

macOS is not a supported platform on Guix, right? Is there new/ongoing work to support that?

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#220
post #219

Earlier quoted context omitted.

New to both. In spite of significant interest and weeks of work, I can't even get Guix installed on bare metal on my Mac nor on my older Acer laptop (a converted chromebook) nor on a raspberry pi. New to Nix and have it running with hardly a hitch on all or these. Reached out to Guix IRC and mailing list with no response (though one helpful HN commenter got back to me -- thank you, and I still need to respond!). Nix…

> I can't even get Guix installed on bare metal on my Mac macOS is not a supported platform on Guix, right? Is there new/ongoing work to support that?

Correct.

> Is there new/ongoing work to support that?

Not a chance -- very focused on free, from what I gather I don't think they even allow discussion of non-free software.

Post reply on HN