Files
matrix/nix/modules/security.nix
2025-10-26 15:14:34 +01:00

17 lines
467 B
Nix

{ config, pkgs, inputs, ... }:
{
# providing an ssh configuration
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no"; # Disable root login
PasswordAuthentication = false; # Force SSH key auth only
PubkeyAuthentication = true; # Enable SSH keys
};
ports = [ 22 ];
};
# other security hardening options can go here
security.sudo.wheelNeedsPassword = false;
}