spec(library): add nginx service, add acme

This commit is contained in:
514fpv 2024-01-05 00:36:49 +08:00
parent e54c40691e
commit b3a780eebd
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
2 changed files with 55 additions and 0 deletions

18
spec/library/acme.nix Normal file
View file

@ -0,0 +1,18 @@
{
security.acme = {
acceptTerms = true;
defaults.email = "koishi@514fpv.one";
defaults.group = "nginx";
certs = let
cloudflare = {
dnsProvider = "cloudflare";
credentialsFile = "/nix/persist/secret/cloudflare";
};
in {
"514fpv.io" = cloudflare;
".514fpv.io" = cloudflare // { domain = "*.514fpv.io"; };
};
};
environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/acme" ];
}