summaryrefslogtreecommitdiff
path: root/nixos/modules/homelab/core/ssh.nix
blob: 1b4b5595fe70fa66127f4c3200e5f539c5afd77a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{config, lib, ...}: let
  cfg = config.homelab.core.ssh;
in {
  options.homelab.core.ssh = {
    enable = lib.mkEnableOption "ssh";
  };
  config = lib.mkIf cfg.enable {
    services.openssh = {
      enable = true;
      ports = [ 2200 ];
      settings = {
        PermitRootLogin = "no";
        PasswordAuthentication = false;
      };
    };
  };
}