22 lines
515 B
Nix
22 lines
515 B
Nix
{ config, lib, ... }: {
|
|
|
|
options = {
|
|
sysconfig.opts.openssh.enable = lib.options.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.sysconfig.opts.openssh.enable {
|
|
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PermitRootLogin = "no";
|
|
PasswordAuthentication = false;
|
|
KbdInteractiveAuthentication = false;
|
|
};
|
|
};
|
|
};
|
|
}
|