Hacker News new | ask | show | jobs
by nagvx 3332 days ago
If we're plugging functional package management, we may as well mention the other significant project in this space - Guix:

https://www.gnu.org/software/guix/download/

Essentially, all the benefits touted above apply here, but it is worth noting that Guix is a younger project. The author was originally a Nix dev, but found the DSL to be too awkward to use in practice, and opted to use Scheme through and through. Yes, Emacs bindings are available.

Also, Guix can now produce Dockerfiles, if that floats your boat:

https://www.gnu.org/software/guix/news/creating-bundles-with...

4 comments

The main thing that probably turns people off to Guix is that GuixSD specifically rejects any non-free software. While a noble goal, it leaves most people's hardware unusable.

The main allure to Nix/Guix is to be used for the internals of an OS. For example, NixOS is the most stable and maintainable system I have ever used, even though the documentation is absolute shit.

This stuff is totally butter side up/down. Guix and Nix should merge dammit.
I'm considering taking a look at GuixSD, and making a fork that accepts non-free packages.

The reason I haven't is that NixOS is just so damn comfortable that I don't want to leave.

You don't need to fork the entire OS, though - just provide the relevant non-free packages on top of the regular OS.

Guix devs themselves have hinted that "adding impurity to a free OS is much easier than removing impurity from a non-free OS", so I suspect they may not be categorically opposed to the idea of non-free packages.

Do you use NixOS as a desktop OS? If so, what advantages do you find over something like Arch? I understand the repoducability from configuration files are often touted as a selling point, but I'm not reinstalling my OS regularly so I don't really see the advantage.
Yes.

It's so easy.

When I upgrade or (un)install a package, I get a completely clean fresh installed system. If upgrading my video driver broke my system, I can just pick the most recent version of my install from the bootloader. When I want to start writing code, I can use nix-shell to create an isolated environment with all the dependencies I need, and get to work, with one command.

At any moment, I know that my entire OS install is completely clean, devoid of any cruft, even if I have been installing and removing obscure software for months. I don't have a mess in /etc, in /usr/share, anywhere.

> I'm not reinstalling my OS regularly so I don't really see the advantage.

With NixOS, I'm never reinstalling my OS, because every update leaves me with a fresh new system, guaranteed.

Personally I run Arch on my desktops but NixOS on my servers. I mostly use Arch because of all the relatively uncommon stuff I occasionally use from the AUR (somehow I doubt STM32CubeMX or ESPtool will enter Nixpkgs any time soon), but I've occasionally ended up cursing that I couldn't do a Nix-style rollback when an update broke something important.
So Haskell users use NixOS and Scheme users use Guix?
It's not Haskell, strictly speaking. There are some weird global state mutations in NixOS (I.e. the pkgs object) that aren't as intuitive as you'd like. Also, the novel file structure makes composing packages that aren't already built to do so quite difficult. Trying to get eclimd to work with emacs and eclipse was a giant pain.
There are no global state mutations in `pkgs`. All immutable parts are in `impure.nix`, which already has a complete `pkgs`.

Maybe you are confusing state mutations with fixed points, which are used extensively (thankfully).

There are no global state mutations in pkgs until you need a custom package, and then you're overriding the global state with your own custom state.
That does not modify global state - it creates a new state from the old one + your modifications.
In other words, it modifies global state.
Generally, yes. Nix has great support for haskell libraries, AFAIK. Guix uses guile scheme, so that certainly attracts scheme users.
> but found the DSL to be too awkward to use in practice

I'm not a packager, but I can't read either.