nixos-configs/nixosModules/openssh.nix

17 lines
387 B
Nix
Raw Normal View History

{ lib, config, ... }:
2025-09-13 17:22:20 +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
};
};
}