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.)

23 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 .

2 Likes

Right indeed @niklaskorz, I am working on a bind mount of /var/nix to /nix to address this.
Quite a lot of people seem to want this. :slight_smile:

It is slightly tricky to cover all use cases: overlaying with rpm-ostree looks problematic for the reason in the issue you mentioned.

You can still benefit from the packaging already though if you install nix-core and nix-legacy: that leaves you to set /nix manually by yourself if you need it.

2 Likes

This is a powerful combination, with some nice advantages. I found your discussion while taking notes on this other project called Nix Toolbox, extending Fedora Toolbox with Nix Home Manager. It writes files to a nix directory under /etc and in the home environment. I still think there’s still a lot of effen’ around with code and would like to see some of that abstracted through Flakes, but it is a way to manage configs and packages that’s hard to beat.

1 Like

Hi @juhp, thanks for the announcement and work! If you don’t mind me asking, what/where is the solution to support the daemon (i.e., multi-user mode) with selinux still enabled in Fedora? It seems that Nix still doesn’t natively support this environment, so I’m wondering how this was accomplished. Thanks!

2 Likes

Well have to post here since I am now going to full bare metal testing on this my small scaled project that is full fedora 44 bootc, atomic hyprland, Nvidia build and signed on build phase and nix package manager :rofl::rofl::rofl::rofl: I made this and posts how I have first setup and next day figured out after more Google stuff to make it more robust and better

1 Like

Good question thanks and I don’t have a great answer yet - though I asked for help on fedora selinux on this. I hope the situation will improve: I think there is one related fedora bug report open. Help is certainly welcome.

1 Like

there is something i want to ask and it is gpu setup. i keep hitting failed state and to fully understand what it actually does and why so i can actually figure this out. Since i am on bootc system so i need to understand this better so i can actually figure the workaround and why nix actually want to setup gpu do it really need it since gpu is already system level activated.

phatle@hyprland:~/.dotfiles$ nix run home-manager/master -- switch --flake .#phatle
warning: Git tree '/var/home/phatle/.dotfiles' is dirty
warning: updating lock file "/var/home/phatle/.dotfiles/flake.lock":
• Updated input 'home-manager':
    'github:nix-community/home-manager/f7f6a559c21dfe5e63108ded0d036ae15e6e9d57?narHash=sha256-pMO5JwJ/0n%2Bq3sIivB2YUPFgbzoL%2BUbAhFlL9fDTMjo%3D' (2026-04-11)
  → 'github:nix-community/home-manager/0d02ec1d0a05f88ef9e74b516842900c41f0f2fe?narHash=sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo%3D' (2026-04-05)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/4c1018dae018162ec878d42fec712642d214fdfa?narHash=sha256-ar3rofg%2BawPB8QXDaFJhJ2jJhu%2BKqN/PRCXeyuXR76E%3D' (2026-04-09)
  → 'github:nixos/nixpkgs/7e495b747b51f95ae15e74377c5ce1fe69c1765f?narHash=sha256-B35lpsqnSZwn1Lmz06BpwF7atPgFmUgw1l8KAV3zpVQ%3D' (2026-04-13)
Starting Home Manager activation
Activating checkExistingGpuDrivers
This non-NixOS system is not yet set up to use the GPU
with Nix packages. To set up GPU drivers, run
  sudo /nix/store/czfv3fmh8y112c4c2sjj41m638h49g0d-non-nixos-gpu/bin/non-nixos-gpu-setup
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
building '/nix/store/5h5l52jwp8cnsi6irnk15f93hygnrk36-user-environment.drv'...
Activating linkGeneration
Cleaning up orphan links from /var/home/phatle
Creating home file links in /var/home/phatle
Activating onFilesChange
Activating reloadSystemd
The user systemd session is degraded:
  UNIT                                             LOAD   ACTIVE SUB    DESCRIPTION             
â—Ź app-nvidia\x2dsettings\x2dload@autostart.service loaded failed failed NVIDIA X Server Settings

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

1 loaded units listed.
Attempting to reload services anyway...
The service manager is degraded.
Failed services: app-nvidia\x2dsettings\x2dload@autostart.service
Attempting to continue anyway...
warning: Git tree '/var/home/phatle/.dotfiles' is dirty

There are 318 unread and relevant news items.
Read them by running the command "home-manager news".