Live data from Hacker News

What is Nix and why you should try it

yakking.branchable.com

121–130 of 201 posts

Re: What is Nix and why you should try it

#121

Earlier quoted context omitted.

But even still you are mixing languages, so the problem remains. The issue is not that Nix uses Bash, but that Nix uses different languages for the host-side and build-side. AFAIK people aren't writing the build-side code in the Nix language, and I'm not sure if it even has the features necessary to do it. Guix unifies the different layers of code execution with a single language, and using a Lisp enabled that design…

> Nix uses different languages for the host-side and build-side. I'm not sure what you mean by that. Nix packages are Nix expressions.

Those package expressions have Bash snippets embedded in them that run on the build daemon. The daemon doesn't evaluate Nix code.

Re: What is Nix and why you should try it

#122
Nix the package manager is great. Poorly documented, but it works as expected. I've also had uneventful experiences using NixOS on a server.

On the other hand, trying to use NixOS on my laptop has been struggle after struggle. Every update breaks something. Many times updates cause the entire system to crash. Different combinations of display managers, window managers, and various system level daemons interact in complex ways.

None of this is the fault of NixOS, really it is the fault of the Unix philosophy scaled to the level of the desktop Linux ecosystem, combined with the traditional assurance on upstream developers that packagers in distros like Ubuntu will fix their shit.

What would be really great for NixOS would be a set of various well tested base configurations for the various DE/WM combos, like all the spinoff Ubuntu distros. These would fix the versions of all the fragile graphical components on some kind of release schedule, while probably still using nixos-unstable underneath for all the relatively reliable stuff like the kernel, emacs, vim, coreutils, etc.

Re: What is Nix and why you should try it

#123

Earlier quoted context omitted.

Guix explicitly rejects non-free software. Unfortunately, that isn't workable for most of us.

Ouch. Is this at a legal or community level?

Community.

There may even be community-based sources for non-free packages, but they are explicitly ignored by the Guix project.

Re: What is Nix and why you should try it

#124

Earlier quoted context omitted.

> Nix uses different languages for the host-side and build-side. I'm not sure what you mean by that. Nix packages are Nix expressions.

Those package expressions have Bash snippets embedded in them that run on the build daemon. The daemon doesn't evaluate Nix code.

How is that a problem?

Re: What is Nix and why you should try it

#125
post #89
post #19

I can vouch for the immense improvement Nix has made to my software development process. I use NixOS on my desktop and laptop. At the OS-level, it gets a lot of things right: reproducible, immutable system configs; lightweight containers; devops with declarative configs. At a software project level, nix-shell is an indispensible tool. Compilers and interpreters aren't even part of my system-wide config; instead each…

To me, when i look at new distro, i look for how well the repo covers binary packages, i have no time/resource to build compilers/big projects. Last time i checked nix, there aren't that many packages in repo to be usable on laptop. But the package manager itself might be a good idea for dev environments, but all the languages i use provide similar facility(not counting system-library dependencies).

I very rarely run into packages that Nix doesn't have prebuilt binaries for.

Re: What is Nix and why you should try it

#126

Earlier quoted context omitted.

Ouch. Is this at a legal or community level?

Community. There may even be community-based sources for non-free packages, but they are explicitly ignored by the Guix project.

Anybody can run guix publish however and self publish their own non-free substitutes if they wanted, plus there's all the existing non-free substitute servers around, and you can try your luck with guix import from nixpkgs. The community won't help anybody if they ask for help with non-free software though.

I haven't missed any non-free packages since switching to Guix surprisingly, I always seem to find a free alternative though my daily req are pretty basic.

Re: What is Nix and why you should try it

#127
post #33

My experience with Nix was a real pleasure, and a complete failure. I set out with the goal of building a development environment for a software I was working on. I thought - Nix sounds like a better Docker, where it's possible to choose package versions independently of the rest of the system. It's perfect for testing! I found the package description language refreshing - it was powerful without getting too complica…

Hm, I'm using CUDA in production via Nix. When did you attempt this? It may be much easier now than it was before. If there's some particular technicality you need solved- like requiring a specific driver version- I can help.

Re: What is Nix and why you should try it

#128

Earlier quoted context omitted.

Why shouldn't one prefer the original over some rando's weakly motivated, niche NIH rehash, unless you're already victim to lisp-induced Stockholm syndrome?

> some rando's This is a GNU-approved fork > weakly motivated Has lots of strong motivation, like a stricter stance on non-free software, the usage of a "real", more expressive language (Guile) instead of a niche, poorly undocumented DSL (Nix), use of GNU Shepherd instead of SystemD for the init system, among other > niche NIH rehash It shares most of the codebase with Nix, so to say it's NIH is missing the point. Ni…

I’d just like to interject for a moment. What you’re refering to as Guix, is in fact, Nix/Guile, or as I’ve recently taken to calling it, Nix plus Guile.

Re: What is Nix and why you should try it

#129
post #122

Nix the package manager is great. Poorly documented, but it works as expected. I've also had uneventful experiences using NixOS on a server. On the other hand, trying to use NixOS on my laptop has been struggle after struggle. Every update breaks something. Many times updates cause the entire system to crash. Different combinations of display managers, window managers, and various system level daemons interact in com…

Yes, this is something that I think is really important in the future. NixOS really needs something like Ubuntu is to Debian or Manjaro is to Arch. Lots of polishing that a standard Linux user can start using out of the box (no instructions required).

Re: What is Nix and why you should try it

#130
post #51

Earlier quoted context omitted.

You could say the same thing about Windows: Windows just isn’t an option yet.... maybe in 5 years when WSL is performant and MSFT has open-sourced enough to not be a threat to more cautious companies.

No, I don't think you can say that. The point is that I have clients that use linux, clients that use windows, and clients that use both windows and linux which need to talk to each other. I need a solution that can factor out the operating system into a module and build packages that will work for both the quants and the servers. I don't get to tell my clients what operating systems to use. I must provide solutions…

Nix has facilities for creating Docker and Singularity containers from a nix expression, which lets you package up arbitrary environments. Does that satisfy your use-case?

https://nixos.org/nixpkgs/manual/#sec-pkgs-dockerTools

Post reply on HN