hosts: housekeeping

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2025-08-31 19:33:29 +05:30
parent cd52be2620
commit 7e4a6ac8fe
15 changed files with 32 additions and 29 deletions

View File

@@ -0,0 +1,21 @@
{
lib,
conf,
config,
...
}:
let
domain = conf.network.addresses.domain.natto;
nginx = config.services.nginx;
in
{
security = {
acme = lib.mkIf nginx.enable {
acceptTerms = true;
certs = lib.mapAttrs (n: _: { email = "natto@${domain}"; }) (
lib.filterAttrs (_: v: v.enableACME) nginx.virtualHosts
);
};
pki.certificateFiles = [ ../../cert.pem ];
};
}