summaryrefslogtreecommitdiff
path: root/nixos/modules/homelab/core/ssh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/homelab/core/ssh.nix')
-rw-r--r--nixos/modules/homelab/core/ssh.nix17
1 files changed, 17 insertions, 0 deletions
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;
+ };
+ };
+ };
+}