nix3-daemon(1)
π nix3-daemon(1) β General Commands Manual π
β οΈ Warning, bestie: this program is experimental and its interface is subject to change. Like, it might just switch up on you. No cap.
β¨ Name β¨
nix daemon β the daemon that does store operations on behalf of non-root clients π«Ά
πΈ Synopsis πΈ
nix daemon [optionβ¦]
π¦ Examples π¦
- Run the daemon, just like that:
# nix daemon
- Run the daemon and listen on standard I/O instead of binding to a UNIX socket:
# nix daemon --stdio
- Run the daemon and force all connections to be trusted:
# nix daemon --force-trusted
- Run the daemon and force all connections to be untrusted:
# nix daemon --force-untrusted
- Run the daemon, listen on standard I/O, and force all connections to use Nix's default trust:
# nix daemon --stdio --default-trust
π Description π
Okay so this command runs the Nix daemon, and it's a required component in multi-user Nix installations. It's out here running build tasks and other operations on the Nix store on behalf of non-root users. Slay. Usually you don't run the daemon directly β instead it's managed by a service management framework like systemd on Linux, or launchctl on Darwin. Let the framework handle it, it's got main character energy.
π Note that this daemon does not fork into the background. It stays right there. It's not leaving. Periodt.
π Socket path π
Unless --stdio is used, the daemon listens on a Unix domain socket. The socket path is figured out similarly as for the Local Daemon Store, in this exact order:
- The
--socket-pathflag, if passed. - The
NIX_DAEMON_SOCKET_PATHenvironment variable, if set. - Otherwise,
daemon-socket/socketwithin the store's state directory. The Local Store, Local Daemon Store, and Experimental SSH Store with filesystem mounted each have their own per-store state directory. For other store types, the globalNIX_STATE_DIRis used.
β‘ Systemd socket activation β‘
nix daemon supports systemd socket-based activation using the nix-daemon.socket unit in the Nix distribution. It supports listening on multiple addresses β iconic behaviour honestly. For example, the following stanza in nix-daemon.socket makes the daemon listen on two Unix domain sockets:
[Socket]
ListenStream=/nix/var/nix/daemon-socket/socket
ListenStream=/nix/var/nix/daemon-socket/socket-2
β¨ Options β¨
--default-trustβ Use Nix's default trust.--force-trustedβ Force the daemon to trust connecting clients.--force-untrustedβ Force the daemon to not trust connecting clients. The connection is processed by the receiving daemon before forwarding commands.--process-opsβ Forces the daemon to process received commands itself rather than forwarding the commands straight to the remote store.
This is useful for the mounted-ssh:// store where some actions need to be performed on the remote end but as connected user, and not as the user of the underlying daemon on the remote end.
--socket-pathpath β Path to the daemon's UNIX socket. OverridesNIX_DAEMON_SOCKET_PATHand the default. Incompatible with--stdio. π«--stdioβ Attach to standard I/O, instead of using UNIX socket(s).
π Logging-related options π
--debugβ Set the logging verbosity level to 'debug'.--log-formatformat β Set the format of log output; one ofraw,internal-json,barorbar-with-logs.--print-build-logs/-Lβ Print full build logs on standard error.--quietβ Decrease the logging verbosity level.--verbose/-vβ Increase the logging verbosity level.
π Miscellaneous global options π
--helpβ Show usage information.--offlineβ Disable substituters and consider all previously downloaded files up-to-date.--optionname value β Set the Nix configuration setting name to value (overridingnix.conf).--refreshβ Consider all previously downloaded files out-of-date.--versionβ Show version information.
π Note: See man nix.conf for overriding configuration settings with command line flags.
And that's the whole page, bestie β this one's from the nix3-daemon(1) manual, like, the General Commands Manual, you know the vibe π Hope it ate. Study it, love it, run it responsibly. Bye bestie πβ¨π
π¦ where this page comes from
- fedora 44: nix-core 2.35.3-2.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms