Files
samfelag/modules/system/ssh.nix
2025-03-24 22:56:23 +01:00

25 lines
475 B
Nix

{ config, lib, pkgs, self, ... }:
let
cfg = config.samfelag.modules.system.ssh;
in
{
options.samfelag.modules.system.ssh = {
enable = lib.mkEnableOption "ssh";
};
config = lib.mkIf cfg.enable {
services = {
openssh = {
enable = true;
settings = {
# TODO: Use ssh keys
PasswordAuthentication = true;
};
};
# fail2ban.enable = true;
};
networking.firewall.allowedTCPPorts = [ 22 ];
};
}