This commit is contained in:
2023-03-01 14:18:49 +00:00
parent 1b8c106166
commit 25be0d06f4
6 changed files with 17 additions and 20 deletions

View File

@@ -0,0 +1,16 @@
{ 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 ];
};
}