Live data from Hacker News

What is Nix and why you should try it

yakking.branchable.com

31–40 of 201 posts

Re: What is Nix and why you should try it

#31
post #6
post #4

Earlier quoted context omitted.

Having never used Nix before, I would like to know what kind of usability issues it faces. For me, the biggest one is that I can't use it at clients running a Windows shop. That's a blocker.

I think biggest ones are i) nix command is a bit complex, but it's getting redesigned [1] & ii) nixpkg definitions sometimes contain a lot of cruft. I've found Guix and GuixSD, which are a GNU-blessed Guile Scheme-based reimplementation of Nix and NixOS, more aesthetically pleasing. Quite simple and elegant in fact. The major differences are that Guix DSLs are implemented on top of Scheme, whereas Nix uses a custom D…

One of the major turn-offs for me in regards to Nix was that it uses a ton of bash scripts.

Guix's use of Scheme is a lot more elegant and powerful, and a lot less hacky than bash.

Re: What is Nix and why you should try it

#32
post #3

On my macOS work machine, Nix has replaced Homebrew. The ability to switch between generations of your system state [1] when a new install goes awry is underrated, IMO. [1] https://nixos.org/nix/manual/#sec-profiles

I really think the biggest roadblock is the command line interface[1]. To replace Homebrew you only need like 3 or 4 commands. Right now, that means 3 or 4 different nix commands with weird arguments. The way Nix is currently set up is great and make sense for the OS, but Homebrew has a much simpler use-case (single-user, all user land packages, very low barrier to entry). I can't wait until that ticket is addressed.

[1] https://github.com/NixOS/nix/issues/779

Re: What is Nix and why you should try it

#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 complicated. Over the course of a couple of days I was able to adapt a few packages and create my own too, with the build environment.

It was almost finished, but the last problem remained: installing CUDA and the userspace portion of the Nvidia driver. It's not rocket science – I thought – all I need is a few .so's, it even works with Docker.

Alas, after battling Nix for another couple of days, trying to use generic GL, installing the Nvidia one, ignoring it altogether or trying to using the host version - I gave up. I found no way to build a package linked against OpenGL that would actually work.

Despite that, I hope to use Nix with a different project in the future.

Re: What is Nix and why you should try it

#34
Recently, I got the opportunity to play with Nix. To me, it felt to be a very nice way to bundle the dependencies along with the application. But there are few questions which always come to my mind were - how people run it in production. Can they achieve all the things (eg monitoring, debugging..) easily just like the app hosted on a linux machine ?

Re: What is Nix and why you should try it

#35
Sounds like a similar solution to gentoo's slotted ebuilds [0]. Switching the 'default' implementation system wide or per user (eselect) has the same issues discussed. Not sure if there is an existing utility (beyond your standard shell script) that can produce sane per-shell environments.

0. https://devmanual.gentoo.org/general-concepts/slotting/index...

Re: What is Nix and why you should try it

#36
post #13

"To deal with this nix provides the nix-shell utility which constructs an environment on demand and runs a new shell based on that environment." I'm sure nix is cool but this sort of sounds like something we just end up using docker for these days (for better or worse).

Yes, Docker is a competing solution. Hopefully in the future we will see a better one, more nix-like.

Re: What is Nix and why you should try it

#37
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…

Here are some links that might help you to get OpenGL work with nix programs on non-NixOS machines:

* https://github.com/NixOS/nixpkgs/issues/9415#issuecomment-30...

* https://github.com/guibou/nixGL

* https://github.com/deepfire/nix-install-vendor-gl

Re: What is Nix and why you should try it

#38
That article on "What is Nix and .. " does not contain the words "Nix is a..." A quick read gave a vague sense that it was about installs and file paths so maybe something package-related? Nothing definite.

If you click through to https://nixos.org/nixos/nix-pills/why-you-should-give-it-a-t...

you will see "Nix is a purely functional package manager and deployment system for POSIX"

Re: What is Nix and why you should try it

#39
post #17
post #6

Earlier quoted context omitted.

I think biggest ones are i) nix command is a bit complex, but it's getting redesigned [1] & ii) nixpkg definitions sometimes contain a lot of cruft. I've found Guix and GuixSD, which are a GNU-blessed Guile Scheme-based reimplementation of Nix and NixOS, more aesthetically pleasing. Quite simple and elegant in fact. The major differences are that Guix DSLs are implemented on top of Scheme, whereas Nix uses a custom D…

For my practical reasons I can not use pure GNU distributions, I am not aware of easy community way to re use packages for other distro or something hacky like that. Not everyone have brainpower and time to build custom packages for rare distro, it is a shame, I really like Guix. NixOS got some recepies for using not 100% libre software.

This is also what keeps me away from Guix. I get that there are third-party repos with non-free software, but using a fringe package of a fringe packager is too far for me.

There’s no good choice here: Nix package definitions and tools are inscrutable and user-hostile; and the alternative Guix is burden with GNU/free software zealotry and GPL.

A somewhat comparable third option is Habitat, from Chef. It also has a pure build system, a package source, and pure, discrete environments. But it’s also got a bunch of service orchestration parts...

Hopefully the Nix redesign will make the tools more palatable for mortals.

Re: What is Nix and why you should try it

#40
post #28
post #4

Earlier quoted context omitted.

Having never used Nix before, I would like to know what kind of usability issues it faces. For me, the biggest one is that I can't use it at clients running a Windows shop. That's a blocker.

Discoverability is a problem everywhere in Nix, from configuration options to documentation. Which makes it necessary to learn its weird poorly implemented functional programming language and read code. Then there is performance, it's very slow and uses a lot of memory making it impossible to use on a 512 MB vm, for example. If you just want a solution for your packaging management needs - Nix is definitely not it. N…

That's nice to hear you say, because I am making a package manager, and I find nix inspiring :p

I keep trying to convince myself that someone's already done it better, and there's no point, but then every solution I look at doesn't seem to be good enough.

Post reply on HN