nixos-config/linux/singularity/network.nix

34 lines
749 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 50051 ];
hostId = "2cadb253";
};
services.openssh = {
enable = true;
settings = {
KbdInteractiveAuthentication = false;
PasswordAuthentication = false;
};
hostKeys = [{
comment = "host@${hn}";
path = "/etc/ssh/host";
rounds = 100;
type = "ed25519";
}];
};
sops.secrets."cloudflare/${hn}" = { };
services.cloudflare-dyndns = {
enable = true;
apiTokenFile = config.sops.secrets."cloudflare/${hn}".path;
domains = builtins.attrNames config.services.caddy.virtualHosts;
};
services.resolved.enable = true;
}