Live data from Hacker News

What Is Nix?

engineering.shopify.com

181–190 of 344 posts

Re: What Is Nix?

#181

Earlier quoted context omitted.

Oh dear... so you have to write a Nix package (and learn how the language and package management work) just to modify global config files, instead of just editing them? That sounds like an absolute nightmare for a local machine, though possibly a great tool for automated systems. Also, if there's no /nix/etc... then what is Nix modifying? sshd (or any other more common program; I'm just using sshd as an example to un…

Interestingly, sshd WILL magically know to look at /nix/store/efgh5678-my-sshd-config-2.0/etc/ssh_config. Usually you would use sshd as a systemd service (possible to do and manage with Nix in Ubuntu, but why would you?). If so, you would write the systemd configuration using Nix and the service file deployed to NixOS (or Ubuntu, imagine deploying some custom/proprietary service you want isolated from whatever else t…

Woah, I'm lost here. The idea is that it uses /etc/ssh/sshd_config as its input? (How do you handle upgrades, then?) What is d4ys2c8kzzcp3g4fv3ivy7a5nkayg7w2?

Re: What Is Nix?

#182
post #168
post #137

Earlier quoted context omitted.

FWIW... I read this article as someone who doesn't know what Nix is. Like no idea at all besides the name sounding familiar. After reading the first few paragraphs I feel I'm not the target audience for the article, which it totally fine, but based on the title of the post, I assumed I was.

Yeah, it was a last-minute title change that I now regret.

Yeah, that's tough :(

On the bright side... sounds like the community (or at least me) would really be into another article as a primer.

Re: What Is Nix?

#183

Earlier quoted context omitted.

Windows ? You're kidding me! Where do I see Windows support? On their website I only see Mac and Linux.

https://github.com/NixOS/nix/pull/3185 please somebody throw github.com/volth or me money to finish this

Would it be possible for you guys to team up and do an opencollective campaign for nix on windows?

The static-haskell-nix[1] project was successful with this approach.

Nix on Windows would be amazing!

[1]: https://opencollective.com/static-haskell-nix

Re: What Is Nix?

#184
post #63

Earlier quoted context omitted.

Unfortunately there's a pretty annoying bug with MacOS which resulted from Apple making /nix non-writable by default. And since /nix is hard coded in all the cached packages it's not easy to fix. This is one big thing that's preventing us from adopting nix https://github.com/NixOS/nix/issues/2925

Buried in that issue is a workaround, although GitHub's UI hides it from you: https://github.com/NixOS/nix/issues/2925#issuecomment-604501...

Several people in my company use the separate volume workaround and it's been totally painless.

Nix has sharp edges but this one is less of a concern than you'd think ime

Re: What Is Nix?

#185
post #2

I'm still confused. What is Nix? Is it an OS, or a package manager? From the looks of it it's a package manager that I should be able to use it on any POSIX system, but I doubt that's the case?

POSIX (eg. Linux), Mac and Windows. Yes, it is magnificent. Immutable, deterministic software on all 3 major platforms. Combined with cached build artifacts, builds and their outputs (including complete target system updates/upgrades) are blisteringly fast, cryptographically secure and completely deterministic. EDIT: Sorry, yes; Windows only via WSL, not natively on Windows proper.

There's also a work in progress for a Nix FreeBSD port[1].

[1]: https://reviews.freebsd.org/D17766

Re: What Is Nix?

#186

Earlier quoted context omitted.

“who liberally makes use of single-responsibility modules” If your aim is precision of language, you should call this “400MB of unaudited and unauditable mystery code from the [total clowns]( https://github.com/babel/babel/pull/3646 )* who run the npm ecosystem.” Imagine [this]( https://medium.com/s/silicon-satire/i-peeked-into-my-node-mo... )* but instead riddled with advertisers and intelligence agencies. Burn it d…

Please take your badly-informed language bashing elsewhere. I actually audit dependencies for a living, and the dependency model that JS uses is far, far preferable for auditability over the "monolithic tightly-coupled framework and a mountain of custom badly-maintained copy-pasted business logic" approach that is widely used elsewhere.

The mean, median, and modal web “application” depends on several thousand packages comprising dozens of layers of dependencies deep. The mystery code that is downloaded and executed when a developer runs `npm install` is orders of magnitude larger than functional operating systems. There is absolutely no quality assurance: these packages are published by literally-no-one-knows with no oversight whatsoever. `npm` suffers unknown and unknowable build breakage on a regular basis: for no perceptible reason, builds fail; the common advice is to nuke `node_modules` and reinstall. The packages are updating constantly: breakage is probable after a small handful of months. The ecosystem itself was probably developed in response to domain-based adtech blockers.

There is absolutely nothing confidence-inspiring about these people, their intentions, or their competence.

Re: What Is Nix?

#187

Earlier quoted context omitted.

“who liberally makes use of single-responsibility modules” If your aim is precision of language, you should call this “400MB of unaudited and unauditable mystery code from the [total clowns]( https://github.com/babel/babel/pull/3646 )* who run the npm ecosystem.” Imagine [this]( https://medium.com/s/silicon-satire/i-peeked-into-my-node-mo... )* but instead riddled with advertisers and intelligence agencies. Burn it d…

Part of the removed code: test("guy", function() { assert.equal(typeof babel.guy, "string"); }); Facepalming so hard right now

That’s a quality test. Don’t you feel more comfortable?

Your browsing experience is in good hands.

Re: What Is Nix?

#188
post #7
post #2

I'm still confused. What is Nix? Is it an OS, or a package manager? From the looks of it it's a package manager that I should be able to use it on any POSIX system, but I doubt that's the case?

It is pretty easy to be confused. Especially since it is also a language yet all the other replies at the time have writing have failed to mention that. While I like the project as a whole, their naming is horrible. Just wait until you get into `nix-env` vs `nix-shell` etc...

Yes, I really wish they didn't name it nix, it is so hard to search for things, because people also use *nix in place of Unix.

Re: What Is Nix?

#189
post #20

Earlier quoted context omitted.

It's kind of a mess. Nix is a collection of tools and systems that together form a highly reproducible build system. Nix is also a declarative, largely pure and lazy programming language that you use to design and specify the different build outputs for the Nix build system. Nixpkgs is, more or less, the only project written using Nix (and a lot of shell). It's a collection of many thousands of "derivations", many of…

I've had the (dis)pleasure of working with several projects that have been built by developers that have religion around Nix. These projects were contract work where the client paid a significant amount of money, and the final product was really poor quality. One of them is a financial application that has strict security requirements, so having a reproducible build system and some of the other qualities of Nix sound…

So I understand correctly from this that nix has no binary packages? If so, why not? To me, compiling from source is not strictly necessary to get reproduceability guarantees. It might actually be harmful if you're not carefully checksumming the build products (e.g. cosmic rays messing with complex builds).

Re: What Is Nix?

#190

Earlier quoted context omitted.

The PhD thesis that goes with Nix is a really great intro to it. It's very accessible and well-structured. It motivates the need for a new take on package management by analogy to memory management in programming languages. It contrasts how software deployment works today (“Fuck it, I’m sure /usr/bin/local/python is a reference to a python 2.7.12 install with PIL available”) to how we used to write software (“Fuck it…

The downside is that the approach works best when packages are aware of the Nix approach. But the packages have not been written with Nix in mind, and some work is needed per package to adapt to the approach.

Nixpkgs has already done much of that work for you, thankfully.
Post reply on HN