nixos-config/modules/common/network.nix

29 lines
591 B
Nix

{ lib, ... }:
with lib;
{
config = {
networking.networkmanager.enable = true;
networking.useDHCP = mkDefault true;
networking.firewall.enable = true;
services.openssh = {
enable = true;
settings = {
StrictModes = true;
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitEmptyPasswords = "no";
};
openFirewall = true;
hostKeys = [
{
comment = "Main key";
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];
};
};
}