To preserve current connections Onizuka's port was manually reverted to the old 922 default, with the intention to follow that
24 lines
490 B
Nix
24 lines
490 B
Nix
{ config, lib, ... }:
|
|
|
|
{
|
|
options.sshd = {
|
|
enable = lib.mkEnableOption "Enables ssh daemon";
|
|
port = lib.mkOption {
|
|
default = 22;
|
|
type = lib.types.port;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.sshd.enable {
|
|
services.openssh = {
|
|
enable = true;
|
|
ports = [ config.sshd.port ];
|
|
settings = {
|
|
ClientAliveInterval = 60;
|
|
ClientAliveCountMax = 3;
|
|
PasswordAuthentication = false;
|
|
PermitRootLogin = "no";
|
|
};
|
|
};
|
|
};
|
|
}
|