nix-config/modules/network/ssh.nix
2025-02-28 00:04:49 +01:00

41 lines
1.3 KiB
Nix

{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.network.ssh;
in {
options = {
horseman.network.ssh = {
enable = mkEnableOption "";
};
};
config = mkIf cfg.enable {
services.openssh = {
banner = ''
==================================================================
=== ==== ==== ========= ================================= ===
=== ==== ==== ========= ================================= ===
=== ==== ==== ========= ================================= ===
=== ==== ==== === === === ==== === = = ==== === ===
=== == == === = == == = == == == = == ===
==== == == === == == ===== = == = = == == ===
==== == == === ===== == ===== = == = = == ==========
===== == ==== = == == = == = == = = == = == ===
====== ==== ====== === === ==== === = = === === ===
==================================================================
'';
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
};
}