sshd: Add support for socket activation
By enabling ‘services.openssh.startWhenNeeded’, sshd is started on-demand by systemd using socket activation. This is particularly useful if you have a zillion containers and don't want to have sshd running permanently. Note that socket activation is not noticeable slower, contrary to what the manpage for ‘sshd -i’ says, so we might want to make this the default one day.
This commit is contained in:
@@ -12,6 +12,9 @@ with lib;
|
||||
|
||||
networking.useHostResolvConf = true;
|
||||
|
||||
# Containers should be light-weight, so start sshd on demand.
|
||||
services.openssh.startWhenNeeded = mkDefault true;
|
||||
|
||||
# Shut up warnings about not having a boot loader.
|
||||
system.build.installBootLoader = "${pkgs.coreutils}/bin/true";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user