From efb1cda6d789e81cce0fafd753fb4d96eed6f9b7 Mon Sep 17 00:00:00 2001 From: triethyl Date: Tue, 2 Sep 2025 21:21:46 -0400 Subject: homelab: working on homelab --- nixos/modules/homelab/core/default.nix | 6 +++++- nixos/modules/homelab/core/ssh.nix | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 nixos/modules/homelab/core/ssh.nix (limited to 'nixos/modules/homelab/core') 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; + }; + }; + }; +} -- cgit v1.2.3