r/emacs • • 12d ago

Question Guix vs Nix as an Emacs user

When I started out with Emacs, I was already using Nix (with a minimal neovim setup). After moving to Emacs, I started learning about Guix. I have guix (the cli/package manager) currently installed on my current system. I am using a very minimal scm file to manage my C/C++ devshell. I really like the scm config. However, I find there are a few packages missing from the Guix repo. Also, some guix commands that pull in from substituters are really slow. So I wanted to know what are people's opinions on using Nix vs Guix for managing and configuring their complete system (like OS, packages and editor stuff). Would you rather go with the pragmatism of Nix or the smooth UX of using Guile and Lisp to configure your system?

Here's the data that I have: - Nix is more pragmatic since it provides a really big repo - The community is big and active. - there's a whole ecosystem around it (but I think that actually speaks to some features that it might be lacking) - It's also used in some level of production.

Here's what I have for Guix: - Gnu project: a personal for me, I like gnu projects (just because) - Really great documentation. I just downloaded the free pdf of GUIX documentation, and I just read it, as opposed to scraping around Nix docs. - Smoother transition: Since I am learning Emacs Lisp, understanding Guile seems much better and practical than learning the Nix DSL. - The community is small, but really helpful, much like Gentoo's community.

The cons for Nix is poor documentation, the DSL itself (since I find lisp a much better way to configure systems than Nix, again a personal thing), lack of a good wiki. Guix's cons are just that it adheres strongly and strictly to non-free software, but then again, it didn't promise anything else either. That's expected of most GNU Projects.

I'd like to know your opinion, what would you do if given the choice. (I know there are many mac, windows and non-nix/-guix users here). What would you do if given the choice b/w Nix and Guix, if you wanted to start declarative system configuration on servers as well as personal computers?

52 Upvotes

48 comments sorted by

15

u/Northis_Seven 12d ago

I use to use Nixos, now Guix. I haven't found anything I couldn't get package wise. Sometimes, a package I need is not in the Guix channel, so I use the nonguix channel. If the package is not there I just use Flathub. That process has worked for my use case and I don't feel like I am missing anything from when I used Nixos. One small caveat about Guix is that sometimes reconfiguring the system can feel slow (possibly slower than Nixos), and I don't know why that is. It sounds like you like Guix already so why not just try it out for yourself?

3

u/Wooden-Ad6265 12d ago

It's true I like guix and that's why I have been moving from devenv.sh to guix shell on my Development workflows. It seems guix is far better in creating development shells than nix, and it's far more documented on this side. However, I do hesitate to go head first into GuixSD. I have an ISO, but due to being a little busy haven't been able to try it out in a VM.

It's true that guix's cli is quite slow. But a lot of people from other forums (Hacker News? and System crafters?) have reported that it's gotten a little better and the future seems really good.

Regarding packaging, to get a package immediately on my system, I can use flatpaks and 3rd party repos. Also, the Guix manual is really great. Writing package recipes is really well-documented.

Thanks for taking the time to reply. Really appreciate it :)

1

u/Ok-Hunter5357 8d ago

I believe you can also install the Nix package manager, and have nix packages on your system. I would always prefer those over flatpacks.

1

u/Wooden-Ad6265 8d ago

I would prefer writing package recipes in GUIX and contributing, but I guess any GUIX user would prefer that in case if they have time.

19

u/ftrx 12d ago

My opinion is that, unfortunately, Guix System is mainly developed by a community interested in HPC rather than desktop use, so many incredibly useful things are missing and aren't really given much thought. LVM and LUKS still have partial support (at least the last time I checked), and ZFS isn't supported except by third parties, and not as an encrypted root; these are factors that, despite me not liking the Nix language, keep me on NixOS for now.

Having a GuixMacs that is, Guix integrating Emacs, configured in Elisp instead of Scheme, would be a dream for me, but for now it remains just that because the community is heading in a different direction compared to what I use and enjoy using every day on both my desktops and my home server... I hope it grows and expands, but so far over the years that hasn't happened, and despite it being essentially a French distro (in terms of the bulk of the developers), even the French government chose NixOS as the base for its national distros (Sécurix and Bureautix, two in-house NixOS rebuilds, the former for servers and the latter for desktops).

3

u/maxecharel 12d ago

interesting answer, thanks! do you have links documenting the 'French (gvt) distros' you mention? 

3

u/ftrx 12d ago

3

u/maxecharel 12d ago

nice move from the French gvt! I had the opportunity to test, not so long ago, the INSEE's Onyxia/SSP cloud, a solid framework. Pretty robust initiative.

1

u/maxecharel 12d ago

PS: and nice tribute to Goscinny and Uderzo, btw 🫡 as a French native speaker, I can only appreciate

2

u/Wooden-Ad6265 12d ago

I think it could be possible that you can move from home-manager on NixOS to Guix Home, at least. That would be a great achievement, I guess.

1

u/ftrx 12d ago

I'm not using home-manager, but Emacs who tangle from org-mode notes to my home, that's not an issue for now, but I'd really like to avoid Nix language when possible while I can't support myself for a zfs encrypted rood on Guix unfortunately...

1

u/Wooden-Ad6265 8d ago

I use literate config and org-auto-tangle for managing my Emacs config only. But I do use home-manager now. So managing dotfiles is completely home-manager's responsibility.

2

u/gnudoc GNU Emacs 11d ago

Very interesting answer! I love knowing in advance what problems to expect, so thank you! Also, I had no idea there was a link between Guix and high-performance computing.

For my switch, any weakness in zfs is probbly not going to be an issue. I only use zfs on my home servers, and while I'd love to try and switch them to guix, I strongly suspect the old but proprietary enterprise hardware will be the bigger factor preventing them working with Guix rather than the zfs. On desktops/laptops, I use btrfs or ext4. I also don't use LVM, or LUKS - I probably should but I never bother.

Can you think of any other "desktop use" software or configuration that is problematic on Guix, that its most enthusiastic advocates might not think to mention?

2

u/ftrx 11d ago

Well, mostly nvidia not-so-FLOSS drivers and cuda ecosystem, maybe some well known remote support (FLOSS, but not entirely) like Rustdesk, printer drivers from known brands.

2

u/gnudoc GNU Emacs 11d ago

Brilliant. Thank you! Good to know (from a selfish point of view) that you're thinking of more things I'm not planning to use on the desktop/laptop machines. Sorry to hear it's problematic for you though.

I have a feeling then that a good target for me might well be NixOS on the servers, where there's lots of potentially weird dell hardware and so on, and GUIX (+nonGUIX 😭) on desktops/laptops where I might want some intel WiFi driver awfulness or similar.

1

u/output_broadcast 12d ago edited 12d ago

My opinion is that, unfortunately, Guix System is mainly developed by a community interested in HPC rather than desktop use

What gives you that impression?

I haven't used them personally but LVM and LUKS seem to work. Or at least the documentation doesn't have any outstanding warnings about it. The ncurses installer doesn't have support for them, that much is true.

3

u/ftrx 12d ago

What gives you that impression?

Most of devs I've seen so far are from INRIA, involved in HPC project. I honestly do not know the whole community but at least the origin is there and seems to be still rooted there...

1

u/output_broadcast 11d ago

IME most devs are standalone FOSS contributors. From a quick search, there's only one recurring dev from INRIA (Ludovic Courtes, who, in all fairness, could be argued is the closest thing Guix has to a project lead). The issue tends to be that these FOSS contributors are all the hacker type and don't really care about things like a nice GUI.

6

u/gnudoc GNU Emacs 12d ago

I've been on Emacs (as my main HCI for everything other than the web) for a few years, and NixOS for a few months. Before switching to NixOS I'd been on arch for 10+ years (I think), other than a couple of Ubuntu servers.

I've had a ton of fun experimenting and figuring out how to recreate all of my old setups in nix-native ways, but I don't think I have deeply understood the why to certain things.I have enough Haskell experience that I think it's not the functional nature of it that's stopping me.

So I suspect that I would benefit from better documentation, though I'm not really able to put my finger on anything in particular. I also love, in principle, that it's gnu-y (though I'm not gonna lie, I'm probably gonna have to keep my WiFi kernel module...), and that it's lisp-y. I definitely intend to have a go at guix, and if I can get it working and stable I would definitely keep it over NixOS.

As for packages existing in nix but not existing in guix - I've heard that the packaging format is easy enough to make your own packages without too much trouble if it's something that reasonably easy to build?

3

u/output_broadcast 12d ago

As for packages existing in nix but not existing in guix - I've heard that the packaging format is easy enough to make your own packages without too much trouble if it's something that reasonably easy to build?

Generally, as long as something is "standard", it only takes a few minutes to write a package for it. But even something that gets built via a custom shell script can get really difficult really fast. Not to mention projects that cobble together multiple build systems.

Also, there's no support for a few build systems, most notably Gradle.

5

u/carmola123 12d ago

I am currently a Nix user, though somewhat begrudgingly. I tried guix once and it really clicked with me, but there were some factors that didn't mesh with me:

1) Unexpectedly, I didn't transition to writing guile as easily as I thought. I like Schemes a lot, but I found Guile, especially Guix's Guile to be really hard to properly work with, with few larger scale examples. Guix's documentation is much, much nicer than Nix, but Nix has so many examples floating around (plus, LLMs know about it pretty well from it being much more popular).

2) I couldn't find support for very specific things I needed, and the support I could get (from the guix subreddit and libera chat) was a trickle compared to the support I got in the bigger nix channels. In general, because Nix has a lot more stuff pre-packaged, I ended up not even needing much support.

3) I found nix flakes much better to work with than what I found in guix. Though that might have changed, since I tried guix last year. Maybe there is better tooling now.

4) The lack of good nvidia support and how badly guix interacts with zfs. I need support for both in my setup.

Ultimately I had to quit guix because I needed nvidia container toolkit for work and no channel offered it, save for someone trying to get it into guix-science-nonfree (and, last I checked, it wasn't accepted yet). I could probably try and work it in by force but I wasn't familiar with the system enough to write my own patches, so I just switched to Nix since everything really worked out of the box with nvidia compatibility.

I would like to try Guix again, the emacs support seems spectacular. When there is a more reliable way to get nvidia containers running on it, and when zfs is stable, I might try it again.

3

u/Wooden-Ad6265 12d ago

Thank you for sharing your opinion. I think that you are making strong points here. But the nvidia support and ZFS support might not be guix's responsibility at all, since it strictly supports free software. If I am correct, nvidia ships non-free drivers.

1

u/carmola123 12d ago

yes, in a way, but the lack of some sort of support makes using said drivers much more troublesome than I would like. I think trying to distance itself from all non-free stuff ends up more harmful than good for the project.

for as useful as nonguix/nongnu ends up being to patch that hole, there will always be some nonfree software (eg. nvidia container toolkit) that becomes extremely annoying to get to work with the machinery of Guix. same with zfs, ending up requiring special kernel versions and patches to get to work, which surely aren't as stable as one would like for daily use.

2

u/Wooden-Ad6265 11d ago

Yes, I agree. It comes down to practicality vs philosophy.

3

u/Thaodan 11d ago

You can view the Guix manual inside Emacs with info-mode.

2

u/WorldsEndless 10d ago

I am a happy emacs & guix system user. I am also a modestly serious gamer. I got Steam working fine, then have used Flatpak for extending my repos. So I used Flatpak for the Discord app and also for Firefox (which takes all day to compile on Guix normal repos)

8

u/Powerful_Attention_6 12d ago

There is no question here in your statements

2

u/maxecharel 12d ago

Now that there's a question (or its functional equivalent), no doubt that you will provide an extended answer

4

u/Wooden-Ad6265 12d ago

My apologies, I misclicked the post button before finishing.

1

u/output_broadcast 12d ago

You can add other substitute servers to Guix by editing the systemd unit file or your system configuration when using it as an OS. There's a list of mirrors here. For missing packages, you can check if a 3rd-party channel has packaged it with https://toys.whereis.social/ (whose SSL certificate has just expired, apparently).

1

u/Donieck 12d ago

I used only Guix, but I'm on Void Linux now. I think that Emacs on Guix is some problematic still

1

u/FarBasis8583 11d ago

I find quite the opposite.

1

u/ffrkAnonymous 11d ago

I've been trying to install and learn nix. I think i'm gonna give up. The more I fiddle, the more it feels like it doesn't fit.

Primarily because I'm learning to use containers. And container philosophy kinda conflicts with nix philosophy. Container isolation does not play well with a centralized /nix/store . This is not directly an issue since a per-container store is fine, and isolation is arguably a good thing, albeit inefficient space-wise. But somewhere I read that Nix is reliant on your on-going /nix/store to get old stuff. nix github does not quite exactly keep old versions. The correct version old apps will pull the wrong version dependencies, or something. Thus trying to recreate a system config from scratch doesn't quite replicate identically, from what I read.

And if that's the case, then a Brewfile works similarly enough.

Maybe guix doesn't have this problem. I'll give it a shot. But for now I need to get work done.

1

u/Ruined_Passion_7355 9d ago

Nix github does in fact keep old versions. We call it a git commit ;)

And the feature you're looking for is called flakes.

Of course you may have issues dealing with compilation, but it is what it is.

1

u/Virtual_Plantain_863 8d ago

I couldn't successfully update or reinstall Guix on my Thinkpad X200s I had last ran in 2024. I think I originally installed early 2020s, when I had more moxy to put effort into random things.

Nix just werkd and I'm having no problems with my declarative and dendritic dotfile and package management across devices, it's great. LLMs lowered the barrier to entry for taking on a new language, so now I get the full suite of support. Not to say I'm an AI monkey, it's just as easy to read it. I care less about systemd than I did back in the day, works with docker etc.

Just something to consider, and just my usecase/perspective. Once Guix can be installed without issue and offers equivalent of home-manager and flakes, I'll (probably) jump ship.

1

u/Wooden-Ad6265 8d ago

Guix has a better home management ecosystem than Nix in fact. Guix already had guix home configured using a home.scm file. Also, I don't think guix would require flakes. Flakes are an experimental feature in NixOS anyways (I mean yeah they are unofficially stable), but guix implements the equivalent in its configuration already.

1

u/Virtual_Plantain_863 7d ago edited 7d ago

Guix home is better than Nix's home-manager? How so? Anyway, for me Nix was the way to go since it just worked out of the box and the config language is less of a consideration now with LLMs (I'd prefer Guile over Nix, but it doesn't really matter). Prior to LLMs, I really liked the idea of everything being lispy for consistency, but less important to me now. Just my $0.02, if Guix works on your machine it sounds like you're already leaning that way.

For me both distros accomplish the higher order objective of declarative package management and reproducible environments so either is fine, but all else equal I'd prefer to support a fully libre and GNU distro, and avoiding systemd is a plus too imo.

1

u/JamesBrickley 7d ago

The greater cross-platform support plus number of packages are the reasons I run Nix/NixOS. Yes, Guile Scheme is far superior to Nix lang DSL. But unless I wish to self-package a whole lot of software it’s not very practical. But for a home system and Emacs usage? GUIX is amazing.

1

u/xplosm GNU Emacs 12d ago

What is your question again?

2

u/Wooden-Ad6265 12d ago

I apologize. I pressed the post button before finishing. It's there now.

1

u/maxecharel 12d ago

Now that there is a question, can't wait for your answer

1

u/xplosm GNU Emacs 12d ago

Grab a chair while you wait 😉

1

u/maxecharel 12d ago

ahahah, thank you for minding my not-so-young back

1

u/kniebuiging 12d ago

I have used guix and nix, and nix is the clear winner for me. nix flakes, the expression language is definitely nicer compared to scheme (and I like lisps actually).

1

u/trimorphic 11d ago

In what ways is it nicer?

1

u/kniebuiging 10d ago

The expression Language is very functional and allows for elegant config files. There are also feature like nix flakes etc that iirc are not available like this in guix (unless added in the meantime ).

0

u/vfclists 12d ago

I'm not that familiar with either, but what are their main strengths?

As far as I can tell Nix is superior in regards of the large amount of packages available, but as far as the configuration language and the production mechanisms go is Nix that superior to Guix?

If Guix had the depth and breadth of Nix packages what would be your preference?

4

u/Wooden-Ad6265 12d ago

Definitely Guix, because of the Guile implementation. Lisp is something that I have started to love while learning to configure Emacs and learning more and more about Emacs Lisp. Consider a working environment, where you could manage your systems technically with the same language, that you have a deep understanding of. I know that the conditions do not exclude the possibility that a person might be proficient in both Nix and Lisp and still achieve the same level of system configuration. However, I would consider the latter to be quite an overhead.