services.openssh.startWhenNeeded

If set, sshd is socket-activated; that is, instead of having it permanently running as a daemon, systemd will start an instance for each incoming connection.

Type
boolean
Default
false
Declared
<nixpkgs/nixos/modules/services/networking/ssh/sshd.nix>