config-new/modules/darwin/ssh.nix
2025-07-03 09:03:46 +02:00

13 lines
284 B
Nix

{ lib, ... }: let
sshOptions = {
PermitRootLogin = "no";
PasswordAuthentication = "no";
};
in {
services.openssh = {
enable = true;
extraConfig = sshOptions
|> lib.mapAttrsToList (name: value: "${name} ${value}")
|> lib.concatStringsSep "\n";
};
}