diff options
Diffstat (limited to 'nixos/modules/homelab/core')
| -rw-r--r-- | nixos/modules/homelab/core/default.nix | 6 | ||||
| -rw-r--r-- | nixos/modules/homelab/core/ssh.nix | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/nixos/modules/homelab/core/default.nix b/nixos/modules/homelab/core/default.nix index d4ee9df..f2202aa 100644 --- a/nixos/modules/homelab/core/default.nix +++ b/nixos/modules/homelab/core/default.nix @@ -1 +1,5 @@ -{config, pkgs, lib, ...}: {} +{...}: { + imports = [ + ./ssh.nix + ]; +} diff --git a/nixos/modules/homelab/core/ssh.nix b/nixos/modules/homelab/core/ssh.nix new file mode 100644 index 0000000..1b4b559 --- /dev/null +++ b/nixos/modules/homelab/core/ssh.nix @@ -0,0 +1,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; + }; + }; + }; +} |
