Jafner.net/nix/nixos/security.nix

25 lines
451 B
Nix
Raw Normal View History

{ ... }: {
# Enable passwordless sudo
security.sudo = {
enable = true;
extraRules = [{
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
groups = [ "wheel" ];
}];
};
# Enable SSH server with exclusively key-based auth
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
};
}