{ lib, config, ... }: let inherit (lib) mkIf mkOption types; in { options.smayzy.openssh.enable = mkOption { type = types.bool; default = false; description = "openssh"; }; config = mkIf config.smayzy.openssh.enable { services.openssh = { enable = true; ports = [ 22 ]; settings = { PasswordAuthentication = true; AllowUsers = null; UseDns = true; X11Forwarding = false; PermitRootLogin = "prohibit-password"; }; }; }; }