nixos-config/linux/nebula/network.nix

43 lines
949 B
Nix
Raw Normal View History

2023-10-09 10:44:07 -07:00
{ config, ... }:
2023-11-09 20:24:14 -08:00
let hn = config.networking.hostName; in {
2023-10-09 10:44:07 -07:00
networking = {
domain = config.constants.domain;
firewall.allowedTCPPorts = [ 80 443 ];
hostId = "e6449321";
networkmanager = {
enable = true;
wifi.backend = "iwd";
};
nftables.enable = true;
tempAddresses = "disabled";
wireless.iwd.enable = true;
};
sops.secrets."cloudflare/${hn}" = { };
services.cloudflare-dyndns = {
enable = true;
apiTokenFile = config.sops.secrets."cloudflare/${hn}".path;
domains = builtins.attrNames config.services.caddy.virtualHosts;
ipv4 = false;
ipv6 = true;
};
services.openssh = {
enable = true;
hostKeys = [{
comment = "host@${hn}";
path = "/etc/ssh/host";
rounds = 100;
type = "ed25519";
}];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
services.resolved.enable = true;
}