nixos-config/linux/singularity/network.nix
2023-11-27 21:44:04 -08:00

36 lines
849 B
Nix

{ config, ... }:
let hn = config.networking.hostName; in {
networking = {
domain = config.constants.domain;
firewall = {
allowedTCPPorts = with config.constants.port; [ http https ];
};
hostId = "2cadb253";
nftables.enable = true;
};
services = {
cloudflare-dyndns = {
enable = true;
apiTokenFile = config.sops.secrets."cloudflare/${hn}".path;
domains = builtins.attrNames config.services.caddy.virtualHosts;
};
openssh = {
enable = true;
settings = {
KbdInteractiveAuthentication = false;
PasswordAuthentication = false;
};
hostKeys = [{
comment = "host@${hn}";
path = "/etc/ssh/host";
rounds = 100;
type = "ed25519";
}];
};
resolved.enable = true;
};
sops.secrets."cloudflare/${hn}" = { };
}