2023-11-12 00:40:26 +01:00
|
|
|
{ lib, config, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
config = {
|
2024-07-30 20:42:59 +02:00
|
|
|
services.openssh = {
|
2023-11-12 00:40:26 +01:00
|
|
|
enable = true;
|
2024-07-27 11:43:04 +02:00
|
|
|
settings = {
|
|
|
|
StrictModes = true;
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
KbdInteractiveAuthentication = false;
|
|
|
|
PermitEmptyPasswords = "no";
|
|
|
|
};
|
2023-11-12 00:40:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
(mkIf config.services.nginx.enable 80)
|
|
|
|
(mkIf config.services.nginx.enable 443)
|
2024-07-30 20:42:59 +02:00
|
|
|
(mkIf config.services.openssh.enable 22)
|
2023-11-12 00:40:26 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|