The nix package
Find a file
2026-01-14 22:58:18 +08:00
.fmf initial CI test 2025-10-27 17:39:39 +08:00
examples fix example/flake with flake-utils 2025-11-02 21:10:29 +08:00
plans initial CI test 2025-10-27 17:39:39 +08:00
tests/smoke CI: use 2 examples too 2025-10-28 00:54:32 +08:00
.gitignore Import rhbz#2388768 2025-10-27 12:42:00 +08:00
13995.patch Import rhbz#2388768 2025-10-27 12:42:00 +08:00
14001.patch Import rhbz#2388768 2025-10-27 12:42:00 +08:00
14005.patch Import rhbz#2388768 2025-10-27 12:42:00 +08:00
14018.patch Import rhbz#2388768 2025-10-27 12:42:00 +08:00
14593.patch filter out rellinks from manpages (#2415126) 2025-11-19 16:49:12 +08:00
changelog Convert to %autorelease and %autochangelog 2025-11-03 01:30:13 +08:00
nix-disable-mdbook.patch simplify nix-disable-mdbook.patch: disable 2 more manual cmds 2025-11-13 22:40:02 +08:00
nix-filesystem.conf Import rhbz#2388768 2025-10-27 12:42:00 +08:00
nix.conf Import rhbz#2388768 2025-10-27 12:42:00 +08:00
nix.spec ghost /nix/var/nix/* and sockets 2025-11-28 15:26:01 +08:00
nix.sysusers Import rhbz#2388768 2025-10-27 12:42:00 +08:00
README.md readme: for singleuser setup check id output 2025-11-28 12:29:05 +08:00
registry.json Import rhbz#2388768 2025-10-27 12:42:00 +08:00
sources Import rhbz#2388768 2025-10-27 12:42:00 +08:00

How to setup nix on Fedora.

Nix has two different modes of operation:

Daemon mode for multi-user setup

This is recommended by upstream and more seamless. The nix-daemon requires functioning systemd.

Just install the nix package, which pulls in nix-daemon, by running:

$ sudo dnf install nix nix-daemon
$ sudo systemctl enable --now nix-daemon

Single-user mode without nix-daemon

This mode also works in rootless containers and without systemd.

Run:

$ sudo dnf install nix --exclude nix-daemon
$ sudo usermod -aG nixbld $USER

and restart your login session: make sure the nixbld group appears in id output.

This avoids the need to run nix-daemon.

Rootless nix store under /home

Alternatively one can run rootless nix (which uses chroots) with just:

$ dnf install nix-core nix-legacy

The user nix store is: ~/.local/share/nix/root/nix/store.

This also allows sharing one's nix store with toolboxes, etc. However then nix profiles can only be used inside nix shells.

Nixpkgs

You may want to setup a default nix channel.

$ nix-channel add https://nixos.org/channels/nixos-25.11 nixpkgs

for legacy commands, if you don't want to use rolling nixos-unstable.

Testing

A simple way to check nix is working is to run e.g. nix-shell -p hello. After a while of downloading, this should put you in a nix shell subprocess where you should be able to run hello.

Run nix --help to learn more about the nix CLI or read https://nix.dev/.