move some stuff into hosts/hostname/profiles

This commit is contained in:
xunuwu 2025-06-06 11:28:00 +02:00
parent 9c9a3d543c
commit e2946e4a1f
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
33 changed files with 14 additions and 14 deletions

View file

@ -1,43 +0,0 @@
{
vars,
config,
...
}: let
inherit (vars) domain;
hopper = "10.0.0.2";
in {
networking.firewall.allowedTCPPorts = [80 443];
security.acme = {
acceptTerms = true;
defaults.email = "xunuwu@gmail.com";
certs = {
"${domain}" = {
domain = "${domain}";
extraDomainNames = ["*.${domain}"];
dnsProvider = "cloudflare";
reloadServices = ["caddy.service"];
credentialFiles.CF_DNS_API_TOKEN_FILE = config.sops.secrets.cloudflare.path;
};
};
};
services.caddy = {
enable = true;
virtualHosts = {
misc = {
hostName = "${domain}";
serverAliases = ["*.${domain}"];
useACMEHost = domain;
extraConfig = ''
reverse_proxy ${hopper}
'';
};
other = {
extraConfig = ''
respond 404
'';
};
};
};
}