Where Is the Nix Store and Config?
Nix keeps immutable package outputs in the top level store directory. User environments are exposed through profile symlinks and configured with system and user config files.
Last updated
The logical store path is fixed to allow binary substitution across machines. A physical relocation needs a chroot store and limits execution.
Profiles point at store paths to build the user environment. Config files set store options with substituters and feature flags.
Where Nix stores this, by platform
/nix/store/<hash>-<name>/
<hash> is the content hash prefix. <name> is package name plus version. Store is read only. Do not edit files there directly.
/home/<user>/.nix-profile
<user> is the Linux account name. Symlink points to the current profile generation under state profiles. System profiles live under /nix/var/nix/profiles per user.
/etc/nix/nix.conf
System wide Nix config. User override lives at user config nix nix.conf. Single user fallback on Linux may use local share nix root.
/nix/store/<hash>-<name>/
<hash> is the content hash prefix. <name> is package name plus version. Same logical path as Linux so cached binaries stay compatible.
/Users/<user>/.nix-profile
<user> is the macOS account name. Symlink points to the active profile generation. Check target with readlink to find the exact store profile path.
/etc/nix/nix.conf
System wide Nix config on macOS. Managed by the installer and the daemon. User override lives at user config nix nix.conf.
Frequently asked questions
Can I move /nix/store?
No for normal installs. The path is baked into binaries for substitution. Use a chroot store only for isolated builds on Linux, with the limits that implies.
Where is my current profile?
Read the .nix-profile symlink in your home folder. Each generation links to a store profile path. Older generations stay as garbage collector roots until collected.
Notice an outdated path? Let us know.