nixos-config/linux/singularity/network.nix

37 lines
849 B
Nix
Raw Normal View History

2023-10-09 10:44:07 -07:00
{ config, ... }:
2023-11-27 21:44:04 -08:00
let hn = config.networking.hostName; in {
2023-11-27 13:19:16 -08:00
networking = {
2023-10-09 10:44:07 -07:00
domain = config.constants.domain;
2023-11-14 20:56:38 -08:00
firewall = {
2023-11-27 21:44:04 -08:00
allowedTCPPorts = with config.constants.port; [ http https ];
2023-11-14 20:56:38 -08:00
};
2023-10-09 10:44:07 -07:00
hostId = "2cadb253";
2023-11-14 20:56:38 -08:00
nftables.enable = true;
2023-10-09 10:44:07 -07:00
};
2023-11-14 20:56:38 -08:00
services = {
cloudflare-dyndns = {
enable = true;
apiTokenFile = config.sops.secrets."cloudflare/${hn}".path;
domains = builtins.attrNames config.services.caddy.virtualHosts;
2023-10-09 10:44:07 -07:00
};
2023-11-14 20:56:38 -08:00
openssh = {
enable = true;
settings = {
KbdInteractiveAuthentication = false;
PasswordAuthentication = false;
};
hostKeys = [{
comment = "host@${hn}";
path = "/etc/ssh/host";
rounds = 100;
type = "ed25519";
}];
};
resolved.enable = true;
2023-10-09 10:44:07 -07:00
};
2023-11-27 21:44:04 -08:00
sops.secrets."cloudflare/${hn}" = { };
2023-10-09 10:44:07 -07:00
}