Files
vmimages/mods-old/ssh.nix
2023-02-25 04:46:28 +00:00

16 lines
356 B
Nix

{ lib, config, pkgs, ... }: {
#define option to enable this
options.mymods.sshd.enable = lib.mkEnableOption "Enable SSH";
config = lib.mkIf config.mymods.sshd.enable {
services.openssh = {
enable = true;
settings.permitRootLogin = "no";
settings.passwordAuthentication = false;
};
networking.firewall.allowedTCPPorts = [ 22 ];
};
}