nix-config/modules/nixos/core/openssh.nix

24 lines
380 B
Nix
Raw Permalink Normal View History

{ config, lib, ... }:
with lib;
let
2025-05-03 16:50:27 +01:00
cfg = config.core.openssh;
in
{
2025-05-03 16:50:27 +01:00
options.core.openssh.enable = mkEnableOption "Enable openssh";
config = mkIf cfg.enable {
services.openssh = {
enable = true;
openFirewall = lib.mkForce true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = lib.mkForce "no";
};
};
};
}