nix-conf/modules/ssh/default.nix
2024-07-10 23:02:54 +02:00

27 lines
420 B
Nix

{
config,
lib,
pkgs,
self,
...
}:
let
cfg = config.jopejoe1.ssh;
in
{
options.jopejoe1.ssh = {
enable = lib.mkEnableOption "Enable ssh";
};
config = lib.mkIf cfg.enable {
services.openssh = {
enable = true;
banner = "Hackers are in Your System!!!\n";
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
};
}