run nixfmt

This commit is contained in:
Joakim Repomaa
2025-03-01 13:23:01 +02:00
parent a93d4afbcf
commit 8dfc9b5a6d
51 changed files with 1611 additions and 778 deletions

View File

@@ -69,8 +69,10 @@ in
virtualHosts = tailscaleAuthVhosts;
};
virtualHosts = lib.mapAttrs
(_: { proxyBuffering, locations, ... }: {
virtualHosts = lib.mapAttrs (
_:
{ proxyBuffering, locations, ... }:
{
forceSSL = true;
enableACME = true;
http2 = true;
@@ -79,26 +81,33 @@ in
(lib.optionalString (!proxyBuffering) "proxy_buffering off;")
"charset utf-8;"
];
locations = lib.mapAttrs
(_: { proxyPort, extraConfig }: lib.mergeAttrsList [
locations = lib.mapAttrs (
_:
{ proxyPort, extraConfig }:
lib.mergeAttrsList [
{ inherit extraConfig; }
(if (lib.isInt proxyPort) then {
proxyWebsockets = true;
proxyPass = "http://localhost:${toString proxyPort}";
} else { })
])
locations;
})
cfg.vHosts;
(
if (lib.isInt proxyPort) then
{
proxyWebsockets = true;
proxyPass = "http://localhost:${toString proxyPort}";
}
else
{ }
)
]
) locations;
}
) cfg.vHosts;
};
octodns.records = lib.filterAttrs (name: _: name != config.networking.domain) (
lib.mapAttrs'
(fqdn: _: {
name = lib.removeSuffix ".${config.networking.domain}" fqdn;
value = { CNAME.toRoot = true; };
})
cfg.vHosts
lib.mapAttrs' (fqdn: _: {
name = lib.removeSuffix ".${config.networking.domain}" fqdn;
value = {
CNAME.toRoot = true;
};
}) cfg.vHosts
);
};