diff --git a/src/nix/daemon.md b/src/nix/daemon.md index 0993135e5ee3..d4090471c387 100644 --- a/src/nix/daemon.md +++ b/src/nix/daemon.md @@ -31,4 +31,18 @@ management framework such as `systemd`. Note that this daemon does not fork into the background. +# 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; for example, the following stanza in +`nix-daemon.socket` makes the daemon listen both on a Unix domain +socket and on port 1234: + +``` +[Socket] +ListenStream=/nix/var/nix/daemon-socket/socket +ListenStream=1234 +``` + )""