Nix package manager now available in Fedora

It has already been a few weeks now, but I wanted to announce here more widely that the nix package manager has been packaged in Fedora and is available in the updates repos for all current Fedora releases (and also EPEL 10), which makes it very easy to install and setup nix now in Fedora Linux.

The Fedora package supports both nix-daemon and single-user setups and can also be used in pure rootless mode on Fedora Atomic desktops. It also has flakes enabled out of the box.

See the Fedora nix package page for more details – it is also an approved Fedora 44 “Change” (feature), which includes allowing the use of/nixfor the fedora nix package: this is thanks to Zbigniew who also did the package review. I also made a few upstream contributions which allowed nix to be packaged properly for Fedora. :slight_smile:

(If someone wants to move this to the Announcements category that would also be fine.)

16 Likes

If it gets moved to that category then you won’t be able to reply to your own topic.

1 Like

This is wonderful news! Congratulations and thanks for doing the hard work and struggling through the idiosyncrasies of upstream. Hopefully we’ve addressed your issues adequately.

What sort of support window would be best to accommodate fedora’s policies in that regard? I guess sticking with the stable nix release (the one used by stable nixos), but that still has a rather short support window of 7 months. Is that acceptable?

From what I understand, sticking with less cutting-edge dependencies than what nixpkgs stable provides as the baseline would be welcome, but it’s not immediately clear to me how to best achieve good CI coverage for that.

Please reach out in the matrix nix room and otherwise on discourse in DMs if you have any suggestions for how we could make out-of-tree packaging easier and more sustainable.

3 Likes

Thanks @xokdvium - I think 6-12 months of “support” would probably be okay for Fedora Linux releases: still early days for me - I need to get more experience first: currently Fedora releases are maintained for about 13 months, though as such we could consider upgrading after 6 months if possible: I think the main blocker is likely going to be dependencies, e.g. currently we are still blocked on 2.32+ due to boost version, but that should finally happen soon for coming Fedora 44 with a bit of luck. And I suppose security fixes for older branches. Of course for EPEL we really need LTS: EPEL 10’s 2.24 is already “really old” I suppose and I can see it becoming a real pain point down the road, since epel releases will be maintained for about 10 years!

I want to note that Meson had really made nix a lot easier to build - when I started out packaging nix for fedora (with autotools) it was really quite painful and not in a very good state compared to now I would say - so that has been really welcome and pleasant improvement overall. :slight_smile:

2 Likes

Nice work! I tried installing this on an atomic fedora-based distribution but got stuck at Determine support path for RPMs that install into `/opt`, `/usr/local` etc · Issue #233 · coreos/rpm-ostree · GitHub . I’m already familiar with this from the lix/detnix installers (which setup their nix store in /var/home/nix already but then fail to link it into /nix) but was hoping now that there is an “official” nix package, this could be resolved more nicely. For now it seems like I will have to continue layering my own images based on the distribution’s image just to mkdir /nix .