nichts/modules/services/ssh.nix

22 lines
442 B
Nix
Raw Normal View History

2024-11-01 13:49:42 +01:00
{lib, ...}: let
inherit (lib) mkEnableOption;
in {
options.modules.programs.ssh.enable = mkEnableOption "ssh";
2024-07-21 21:58:18 +02:00
config = {
programs.ssh.startAgent = true;
2025-03-04 22:32:40 +01:00
programs.ssh.pubkeyAcceptedKeyTypes = [
"ssh-rsa"
"ecdsa-sha2-nistp521"
];
2024-07-21 21:58:18 +02:00
services.openssh = {
enable = true;
2025-03-02 21:17:17 +01:00
ports = [8997];
2024-07-21 21:58:18 +02:00
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
};
}