The nix package
Find a file
Jens Petersen 10c05493cd build with make rather than partial meson
- this gains manpages
- but loses soversion
2025-12-10 11:35:08 +09:00
.fmf initial CI test 2025-10-27 17:39:39 +08:00
examples add some example *.nix files 2025-10-27 16:33:21 +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 use 2.24 for epel10 2025-11-26 22:41:30 +08:00
nix-filesystem.conf Import rhbz#2388768 2025-10-27 12:42:00 +08:00
nix-manual-disable.patch build with make rather than partial meson 2025-12-10 11:35:08 +09:00
nix.conf nix.conf: define system to help older nix 2025-11-26 22:41:30 +08:00
nix.spec build with make rather than partial meson 2025-12-10 11:35:08 +09:00
nix.sysusers Import rhbz#2388768 2025-10-27 12:42:00 +08:00
README.md sync with fedora nix-2.31.2-33 2025-12-10 11:35:08 +09:00
registry.json Import rhbz#2388768 2025-10-27 12:42:00 +08:00
sources use 2.24 for epel10 2025-11-26 22:41:30 +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/.