News for hackers. Stuff that matters.

Why all the NixOS hype? Did we all forget about Guix?

I love the idea behind Fedora SilverBlue, and NixOS, etc but we never seem to hear about Guix. For me I’d rather write things in lips than in whatever language Nix uses. Has anyone used a Guix build before to get a working workstation? Thoughts?

https://guix.gnu.org/en/manual/en/guix.html#Setting-Up-the-Daemon

( 46 comments | 2 points | on HN )
Re:Why all the NixOS hype? Did we all forget about Guix? by OhSoHumble on Monday December 26, 2022 @07:50PM (#34143640)
At some point, I just will use whatever has the most momentum behind it. I care a lot more about documentation and community support than whether or not there is a more elegant technical solution.

Also, I don't know who needs to read this but ChatGPT explains how to do things in Nix better than any Nix community member ever has for me. I can ask it "how do I create a directory with Nix" and it gives me the function and a practical example. It's great.

Re:Why all the NixOS hype? Did we all forget about Guix? by bitmapper on Monday December 26, 2022 @08:54PM (#34144089)
What do you mean the function to create a directory? When would you be creating directories outside of derivation build phases?
Re:Why all the NixOS hype? Did we all forget about Guix? by OhSoHumble on Monday December 26, 2022 @10:19PM (#34144622)
What if I want a workspace directory in my $HOME to clone repositories to after I image my laptop? How do I codify that state?
Re:Why all the NixOS hype? Did we all forget about Guix? by rgoulter on Monday December 26, 2022 @10:41PM (#34144812)
Nix's raison d'etre is building packages in as much isolation as possible. When building packages, HOME is set to /homeless.

However, for setting up stuff in $HOME, there's a popular tool which uses the Nix expression language as its configuration language: home-manager. Even then, home-manager is more about using nix to configure programs. (I use it to symlink dotfiles). Nix's default is "the stuff it symlinks is read-only".

For "ensure this directory exists", I'd have `mkdir -p <dir you want>` in your shell's init / rc file.

Re:Why all the NixOS hype? Did we all forget about Guix? by OhSoHumble on Monday December 26, 2022 @11:17PM (#34145056)
I use home-manager, yeah.

I think the trouble is this:

Nix (or NixOS, really), on the surface, looks like a configuration management system and a packaging specification had a functional programming baby.

Now, I'm a systems engineer who generally writes in easy-to-use languages. I've used Arch the past decade and have used a variety of tools to automate my personal systems. My team is composed of systems administrators and network engineers who transitioned into devops-esque roles. Part of the purview of our jobs is to use configuration management systems to codify OS state. This could either result in an immutable image or mutable state on a long-running piece of field hardware.

Nix looks like a potential replacement for something like Ansible/Packer and there are a variety of projects hitting the front page of Hacker News that semi-presents it as a replacement (stuff like nix-ops or image to cloud pipelines).

So as someone who codifies system state as part of their day-to-day job, I'm looking at NixOS as a potential alternative. And there seems to be ABSOLUTELY no community support or documentation for learning Nix from a systems administrator point of view. Which is absolutely maddening because I'm an individual contributor that decides how packaging is done within a organization. Everybody in my team looked at Nix and said "this is absolutely impossible to use - we are literally never going to use this to support our organization."

And that's mostly because there is no guiding principle for how to adapt your mental model to think about the new paradigm if you're coming from something like Ansible... and there is no structured documentation for how to produce an OS state when what you know is YAML blocks or a Ruby based DSL.

I mean, it feels like the bones are there: you use Nix to install packages, start services, configure network interfaces, manage the kernel, etc.

But it also feels like Nix was built by functional programmers for functional programmers - with no UX for the people who would actually manage operating systems within a technical organization. Your syseng team isn't going to be functional programming whizzes. They're going to know Go or Python and be able to do medium-difficulty leetcode problems.

Honestly, there needs to be a "NixOS for Ansible Programmers." And if it's absolutely apples to oranges, then that needs to be communicated upfront somewhere.

Re:Why all the NixOS hype? Did we all forget about Guix? by 1MachineElf on Monday December 26, 2022 @07:50PM (#34143641)
I'd like to see more interest in GuixSD as well.

Their work on bootstrapping is especially cool: https://news.ycombinator.com/item?id=18621393

Re:Why all the NixOS hype? Did we all forget about Guix? by tmtvl on Monday December 26, 2022 @08:11PM (#34143788)
I once installed Guix on my laptop in the past, but that was before the Plasma desktop was added, so I quickly went back to OpenSUSE. Now that Guix also has a decent desktop I may give it another whirl.
Re:Why all the NixOS hype? Did we all forget about Guix? by mixedCase on Monday December 26, 2022 @08:22PM (#34143863)
I have no patience for FOSS maximalism as a default. That's why today I run NixOS.
Re:Why all the NixOS hype? Did we all forget about Guix? by MuffinFlavored on Monday December 26, 2022 @08:53PM (#34144086)
I have no patience for tinkering with configs/learning some crazy syntax/worrying about toolchain reproducibility, that's why I run Mac OS, install Rust/node.js/Go/Java/C compiler once and forget about it.
Re:Why all the NixOS hype? Did we all forget about Guix? by rgoulter on Monday December 26, 2022 @09:26PM (#34144325)
I won't argue that NixOS is a good choice for a practical-oriented "just do it" attitude.

I'd say, though, that Nix has benefits above just package reproducibility.

e.g.:

> install Rust/node.js/Go/Java/C compiler once and forget about it.

And if you need dependency libraries, you copy-paste the `brew install` commands from the readme. And if different projects need different Node versions, you'd use NVM to manage those.

These problems are solvable and don't take much effort. (Well, for deploying code, it's difficult enough that Docker containers are as popular as they are).

With Nix, you can have a "put in effort now to save effort later". So you can get the above as "push of a button" without having to copy-paste the commands. -- I mean, that's a neat benefit, that's not really focused on "reproduce the exact behaviour".

Re:Why all the NixOS hype? Did we all forget about Guix? by diffeomorphism on Tuesday December 27, 2022 @01:49AM (#34145939)
Installing macos on a Dell laptop, adding kexts, adding brew or macports, adding proper window management,... requires much more patience for tinkering. Or were you comparing to preinstalled, where to no surprise you have paid someone to do that for you?

> install and forget about it.

You are aware that problems don't just disappear when you forget, right?

Re:Why all the NixOS hype? Did we all forget about Guix? by guilhas on Wednesday December 28, 2022 @11:10AM (#34162388)
I think Guix approach is good, devs manage the OS, community manages open-source packages, some third-party manages the non-free channels. And they are as easy to use

https://gitlab.com/nonguix/nonguix/

There are flatpacks, snaps, appimages, PPAs, channels... why would you except a linux distro maintainer to work for free for a billion dollar company? Testing and maintain their software

Re:Why all the NixOS hype? Did we all forget about Guix? by guilhas on Wednesday December 28, 2022 @02:38PM (#34164934)
I think Guix approach is good, community helps with open-source packages, some third-party manages the non-free channels. And they are as easy to use

https://gitlab.com/nonguix/nonguix

There are flatpacks, snaps, appimages, PPAs, channels... why would you except a linux distro maintainer to work for free for a billion dollar company? Testing and maintain their software

Re:Why all the NixOS hype? Did we all forget about Guix? by mixedCase on Wednesday December 28, 2022 @10:22PM (#34169077)
I don't expect them to do anything, I'm really happy with Guix's approach and I actually prefer Guix as a language to Nix as a language.

But Nix/NixOS provides me a better experiences because of those decisions and thus, is why I use it.

Re:Why all the NixOS hype? Did we all forget about Guix? by sureglymop on Monday December 26, 2022 @08:27PM (#34143894)
The nix hype led me to install nix today and then uninstall and install guix. I just installed it on top of pop-os so don't really have to fear "foss maximalism". I can use it for `guix home` and development shell environments! Pretty cool so far overall :)
Re:Why all the NixOS hype? Did we all forget about Guix? by rgoulter on Monday December 26, 2022 @09:16PM (#34144253)
> For me I’d rather write things in [lisp] than in whatever language Nix uses.

My bet is that the things that are difficult about Nix are difficult about Guix as well; whereas choice of language is cosmetic here.

My understanding is that before nix flakes, guix's CLI was much much nicer.

Re:Why all the NixOS hype? Did we all forget about Guix? by danmur on Tuesday December 27, 2022 @04:10AM (#34146892)
The nix command was nicer before flakes too
Re:Why all the NixOS hype? Did we all forget about Guix? by rowanG077 on Monday December 26, 2022 @10:05PM (#34144532)
I think there are two reasons. S-expressions are not really a language that is readable, whereas nix with all it warts is purpose build, and Guix is way to ideologically driven to be general purpose.
Re:Why all the NixOS hype? Did we all forget about Guix? by rekado on Saturday December 31, 2022 @06:08PM (#34201675)
You're conflating S-expressions and the DSL.

Your attempt to set up "ideologically driven" as an obstacle to "general purpose" is baffling, because we've gone out of our way to make extending Guix close to trivial: via channels, through package transformations, by augmenting the Guile load path to load any modules you might have (with "-L", "GUIX_PACKAGE_PATH", or even just the Guile load path variables).

Re:Why all the NixOS hype? Did we all forget about Guix? by pxc on Friday January 06, 2023 @03:16PM (#34280384)
Casting Guix as uniquely 'ideologically driven' is also silly.

Ideology runs through the communities and development processes of all kinds of tools, including possible alternatives to Guix, like Nix. You can find many Nixpkgs PRs where reviewers are concerned with 'purity' in a technical sense, which is absolutely ideological even when it addresses really important concerns.

And similarly, Nix doesn't let you install non-free software by default, even though it includes the build recipes in Nixpkgs. Software freedom is important (surprise, surprise) to many free software developers, not just contributors to Guix or other GNU projects.

Guix should not be overlooked because of the project's political commitments. It's absolutely general-purpose software which can be used flexibly.

It's not directly related to this exact thread but I want to address the macOS question from a Nix perspective, since it has come up on this post and often comes up on others. macOS breaks Nix all the time, almost on every major OS update. It is a lot of work to keep things working nicely on macOS, and even though Nix's macOS support is really good, it's not as good as the Linux support. While I think that makes Nix accessible to many users in a way that is great, it's totally understandable that Guix currently faces a chicken-and-egg problem in terms of developer interest in supporting macOS— if you don't already use, know, and like macOS, trying to port Guix to it and maintain that support seems daunting and pretty unattractive. I wouldn't want to be responsible for supporting either package manager on macOS.

And I don't think that has anything to do with 'extreme' developer ideology! It's just about the ordinary problem of developer interest and volunteer projects.

Re:Why all the NixOS hype? Did we all forget about Guix? by viraptor on Monday December 26, 2022 @10:25PM (#34144668)
Guix goes way further than reasonable with Foss for me. Refusing to deal with firmware blobs / microcode updates makes it a non-starter for example.
Re:Why all the NixOS hype? Did we all forget about Guix? by guilhas on Wednesday December 28, 2022 @11:52AM (#34162898)
That is maintained by third-party just as easy to use. In Nix you also need to enable it

https://gitlab.com/nonguix/nonguix

Re:Why all the NixOS hype? Did we all forget about Guix? by viraptor on Wednesday December 28, 2022 @02:43PM (#34164981)
It exists, sure. But it basically needs to undo the damage done in the original guix repos and can't even be discussed in the upstream project. (https://news.ycombinator.com/item?id=29286715) If some compatibility is broken, guix won't care.

I don't want to use a project which is actively hostile to what I'm trying to do, even if there are workarounds. It just doesn't seem like a good idea long-term.

Re:Why all the NixOS hype? Did we all forget about Guix? by n8henrie on Tuesday December 27, 2022 @12:39AM (#34145492)
I've been struggling for about a week to figure out how to install Guix System on an old spare laptop. Installer seems to run fine from USB, but I get a whole-system lockup if I try to run even `sudo echo foo` on the resulting system (using all defaults). Using a custom `config.scm` I just get an obscure error upon attempting first login (passwordless root).

Reached out briefly for help on the IRC with no response, same with the guix-help mailing list.

Guix seems really interesting, I'd like to learn some lisp, and I eventually even got an aarch64 Guix System VM running on my M1 Mac... but today I finally gave up and just installed NixOS on the same laptop (actually NIXOS_LUSTRATE over Arch on a BTRFS multi-subvol root). Went without a hitch.

Re:Why all the NixOS hype? Did we all forget about Guix? by slim on Tuesday December 27, 2022 @01:00AM (#34145641)
how much ram do you have?
Re:Why all the NixOS hype? Did we all forget about Guix? by n8henrie on Tuesday December 27, 2022 @11:37AM (#34150230)
Not much, 2G. But enough to run the installer image, enough to build the system definition, enough to run Arch + Sway for the last few years, enough to run NixOS...

My custom system description (https://paste.debian.net/hidden/78313f40) just blinks "error in service module" when I try to log in, which doesn't seem like a OOM issue, but who knows. I can't even log in in order to debug.

Re:Why all the NixOS hype? Did we all forget about Guix? by rekado on Saturday December 31, 2022 @06:05PM (#34201654)
> Reached out briefly for help on the IRC with no response, same with the guix-help mailing list.

IRC (on libera) is pretty active, maybe try again.

I see your mail on help-guix[1], but there's no mention of sudo looking up the system. I'm not familiar enough with btrfs to help here, but there are many btrfs enthusiasts in the community, who could probably help you here.

[1]: https://lists.gnu.org/archive/html/help-guix/2022-12/msg0012...

Re:Why all the NixOS hype? Did we all forget about Guix? by slim on Tuesday December 27, 2022 @01:05AM (#34145681)
I installed guix on top of an old debian on an unupgradable 2008 laptop. now I can get updated software again (when guix does not fail because out of memory)
Re:Why all the NixOS hype? Did we all forget about Guix? by tsuujin on Tuesday December 27, 2022 @01:24AM (#34145777)
I wanted to use guix, but I wanted more strongly to be able to use the same dot file repo across all my computers and cloud servers.

Guix refuses to support any non FOSS hardware (like my MacBook) so that was a deal breaker for me.

Re:Why all the NixOS hype? Did we all forget about Guix? by gigatexal on Tuesday December 27, 2022 @02:59AM (#34146365)
That is likely going to be its Achilles heel :-/
Re:Why all the NixOS hype? Did we all forget about Guix? by spit2wind on Tuesday December 27, 2022 @09:03AM (#34148703)
Is what you want not Guix Home? https://guix.gnu.org/manual/devel/en/html_node/Home-Configur...

Yes, Guix does not support non-Free software. However, nothing prevents you and others from supporting it. I'm fact, it can be and is distributed through channels. If I recall, this is the most prominent: https://gitlab.com/nonguix/nonguix

Re:Why all the NixOS hype? Did we all forget about Guix? by snicker7 on Tuesday December 27, 2022 @01:40PM (#34152049)
I think they are asking for MacOS support (which Nix supports). Not possible with Guix except through a VM.
Re:Why all the NixOS hype? Did we all forget about Guix? by guilhas on Wednesday December 28, 2022 @11:33AM (#34162657)
I thought like that, but after using Guix and Nix I feel like those unified configurations are onto something. Launch your entire system from a sigle config file, avoid forgotten commands
Re:Why all the NixOS hype? Did we all forget about Guix? by tsuujin on Thursday December 29, 2022 @05:33PM (#34179002)
Yes, this is what I use Nix for.

I’m saying I wanted to use Guix but I have MacBooks that I need to support, and Guix doesn’t support Darwin (the macOS system) so I went with Nix.

Re:Why all the NixOS hype? Did we all forget about Guix? by than3 on Tuesday December 27, 2022 @01:26AM (#34145791)
Why all the NixOS hype...

The truth, because some small group of people are trying to manipulate others and promote it or disparage it, despite also not actually solving the inherent problems it has or discussing it once and fixing it. You don't lie or mislead people about things and expect them to keep paying attention.

That same group also happen to utilize some pretty nefarious tactics to amp and de-amp negative sentimental responses, and after a certain point a reader simply can't take the postings seriously anymore.

Some people just aren't mature enough to understand how credibility works, and these type of posts then become flag fodder especially when its the 3rd or 5th time that week that its popped up with nothing new to add.

Nothing is more disrespectful of peoples time polling them in short order, there's no effective gain for it so there is probably some other very manipulative hidden agenda going on. A lot of the responses I've seen could just as easily have been generated from a chat-GPT model with only a few exceptions.

If that were the case, the person orchestrating it is one evil mother#$%#er and why would I touch Nix or Guix in a hundred years with that kind of track record; but that's probably the hidden agenda with a post like this, no?

In either case, whatever your intent, you won't get what you want, and I find that behavior malevolent and deceitful.

Re:Why all the NixOS hype? Did we all forget about Guix? by nix23 on Tuesday December 27, 2022 @01:53AM (#34145975)
Or you know it's that the FSF create new distros and then left them die, also no "unfree" software and firmware in default.

BTW FreeBSD user...and why i even care?

Re:Why all the NixOS hype? Did we all forget about Guix? by mudrockbestgirl on Tuesday December 27, 2022 @03:03AM (#34146390)
I agree with you that the Nix language is a problem, and most likely a mistake in hindsight. Even for someone with lots of functional programming experience it's ugly with bad usability. I'm not familiar with Guix, but I am with Nix and

> Guix is an advanced distribution of the GNU operating system

This sounds like it competes (?) with NixOS, but not with Nix. A reason for the popularity of Nix is that it's not only an operating system. Most Nix users probably haven't touched NixOS, but they use Nix as a package manager, build system, development environment, etc on their local machine. That target audience is a lot larger than those who want to adopt a whole new operating system.

This adoption of Nix outside of the operating system context naturally leads to more adoption of NixOS. If you already work with Nix anyway, it's not that huge of a jump towards adopting NixOS.

Re:Why all the NixOS hype? Did we all forget about Guix? by msgilligan on Tuesday December 27, 2022 @03:15AM (#34146484)
Guix is also both a package manager and a Linux distro:

> You can install GNU Guix on top of an existing GNU/Linux system where it complements the available tools without interference (see Installation), or you can use it as a standalone operating system distribution, Guix System2.

https://guix.gnu.org/en/manual/en/html_node/Introduction.htm...

Re:Why all the NixOS hype? Did we all forget about Guix? by mudrockbestgirl on Tuesday December 27, 2022 @03:24AM (#34146553)
Interesting, I didn't realize this is the case. Unfortunately it looks like there won't ever be MacOS support, which makes this unusable for me.

I think my point about broader applicability still stands though. Compare the guix [0] and nix [1] homepages. The former mainly sells and operating system (and somewhat mentions a package manager), while the Nix homepage sells a tool, kind of like Docker, with concrete examples: Reproducible builds, trying new tools, declarative developer environments, docker images, cloud images. For a lot of people these are immediate practical use cases, which I think is the reason behind the adoption and hype.

I don't know anything about guix, so I'm not sure what of these you can do with guix, but at least the homepage and manual don't give me the impression that these are the use cases. I don't really need an additional package manger or a new OS, but the Nix use cases speak to me.

[0] https://guix.gnu.org/

[1] https://nixos.org/

Re:Why all the NixOS hype? Did we all forget about Guix? by xena on Tuesday December 27, 2022 @08:44AM (#34148530)
Guix is addled by GNU. It will never truly take off unless they can break free of the yoke of GNU and actually deliver true user freedom.
Re:Why all the NixOS hype? Did we all forget about Guix? by guilhas on Wednesday December 28, 2022 @12:03PM (#34163047)
Only Stallman can save us
Re:Why all the NixOS hype? Did we all forget about Guix? by rekado on Saturday December 31, 2022 @06:00PM (#34201633)
Just to clarify in case this might be misunderstood: Stallman has no say in the Guix project.
Re:Why all the NixOS hype? Did we all forget about Guix? by rekado on Saturday December 31, 2022 @05:58PM (#34201622)
There is no yoke. GNU is not RMS, but the people who make GNU software. See also https://gnu.tools.
Re:Why all the NixOS hype? Did we all forget about Guix? by spit2wind on Tuesday December 27, 2022 @09:23AM (#34148866)
I've been happily running Guix as my primary system for at least a year now. I've had near zero issues with basic daily use (guix pull, guix install xxx, guix package -u, etc.) I'm extremely happy to simply install and uninstall software.

For me, the "free software absolutism" is a primary selling point. I don't use Nix because of that.

I've had mixed interactions with the Guix community from welcoming and helpful to arrogant and extremely rude. However, it's a community which is growing and was small for a long time. I see the lack of compassion as problems with individuals rather than the community. Leadership has changed and new organization is taking form. There has been tremendous growth the past year.

The documentation is hit or miss. Either it's great and you find your answer immediately or you find yourself in the weeds, digging through source code, guessing at what something means or guessing if something is Guix or Guile (and good luck with the Guile docs).

Re:Why all the NixOS hype? Did we all forget about Guix? by guilhas on Wednesday December 28, 2022 @11:22AM (#34162520)
I use many distros including Guix

The basic installer is as simple as any other mostly point and click. If you already have your config file you can use it

Has less packages but you can install Nix packages

Since Nix uses systemd I would say it would be easier drop in replacement for someone from Debian

Re:Why all the NixOS hype? Did we all forget about Guix? by podiki on Wednesday December 28, 2022 @01:00PM (#34163756)
Sure, my recent (gaming) desktop runs exclusively on Guix [0, 1]. I love working in all things lisp. Since those were written I've only continued to get deeper into Guix, and now help maintain nonguix and contribute to Guix. I can't imagine going back, it is just so much more fun and educational (to me).

[0] https://boilingsteam.com/how-i-built-my-new-linux-gaming-des...

[1] https://boilingsteam.com/i-love-arch-but-gnu-guix-is-my-new-...