diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-18 08:10:20 -0600 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-18 08:10:20 -0600 |
| commit | d6c4bd6d87d31a2c688fb2fcfdb0cb15d8f9163d (patch) | |
| tree | 07f85b8fac540f7625f90b10ee500a1bc8116ac3 /modules/services/nixos/ssh.nix | |
| parent | ed2550a41c8429a1d2fe897deb878717c2ebc3d1 (diff) | |
| parent | 43af7f28b28021932b318964a953463d8dd79372 (diff) | |
Merge branch 'main' into wg
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"; }; } |
