nix-conf/nixos-modules/ssh/default.nix

28 lines
420 B
Nix
Raw Normal View History

2024-07-10 23:02:54 +02:00
{
config,
lib,
pkgs,
self,
...
}:
2024-01-11 00:19:11 +01:00
2024-07-10 23:02:54 +02:00
let
cfg = config.jopejoe1.ssh;
in
{
options.jopejoe1.ssh = {
enable = lib.mkEnableOption "Enable ssh";
};
2024-01-11 00:19:11 +01:00
config = lib.mkIf cfg.enable {
services.openssh = {
enable = true;
2024-01-30 14:55:47 +01:00
banner = "Hackers are in Your System!!!\n";
2024-01-11 00:19:11 +01:00
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
};
}