sneeuwvlok/modules/nixos/services/networking/ssh/default.nix
Chris Kruining a7a1763fe0
wiiiiips
2026-03-25 16:26:04 +01:00

31 lines
641 B
Nix

{
config,
lib,
namespace,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.sneeuwvlok.services.networking.ssh;
in {
options.sneeuwvlok.services.networking.ssh = {
enable = mkEnableOption "enable ssh";
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
openFirewall = true;
ports = [22];
settings = {
PasswordAuthentication = true;
AllowUsers = ["chris" "root"];
UseDns = true;
UsePAM = true;
PermitRootLogin = "prohibit-password";
PermitEmptyPasswords = "no";
};
};
};
}