2026-05-01 22:39:21 +02:00
|
|
|
{ lib, config, ... }:
|
2025-09-13 17:22:20 +02:00
|
|
|
{
|
2026-05-01 22:39:21 +02:00
|
|
|
options.my.openssh.enable = lib.mkEnableOption "OpenSSH server";
|
|
|
|
|
|
|
|
|
|
config = lib.mkIf config.my.openssh.enable {
|
|
|
|
|
services.openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
settings = {
|
|
|
|
|
PermitRootLogin = "prohibit-password";
|
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
|
KbdInteractiveAuthentication = false;
|
|
|
|
|
};
|
2025-09-13 17:22:20 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|