diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-09 20:36:36 -0600 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-09 20:36:36 -0600 |
| commit | 547d6dc4731b04a240048b0b95c0ea12e0d1f6bd (patch) | |
| tree | dd3d63dfb21c62d2d71a1f8e937d3247c2e78b11 /modules/services/nixos/ssh.nix | |
| parent | 7b9a5eb561948521ac4669074cc746a0f848ed23 (diff) | |
lots of changes, including revamp of network services boot chain on mercury
Diffstat (limited to 'modules/services/nixos/ssh.nix')
| -rw-r--r-- | modules/services/nixos/ssh.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/services/nixos/ssh.nix b/modules/services/nixos/ssh.nix index 2867d10..cfe7883 100644 --- a/modules/services/nixos/ssh.nix +++ b/modules/services/nixos/ssh.nix @@ -8,18 +8,32 @@ in { config = lib.mkIf cfg.enable { services.openssh = { enable = true; + openFirewall = false; hostKeys = [ { path = "/etc/ssh/ssh_host_ed25519_key"; type = "ed25519"; } ]; + + listenAddresses = [ + { + addr = cfg.bind_host; + port = 22; + } + ]; + settings = { PermitRootLogin = "prohibit-password"; PasswordAuthentication = false; }; }; + systemd.services."openssh" = lib.mkIf config.collinux.services.networking.networkd.enable { + after = lib.mkAfter ["network-online.target"]; + wants = lib.mkAfter ["network-online.target"]; + }; + services.tailscale.extraSetFlags = lib.optional config.services.tailscale.enable "--ssh=true"; }; } |
