1
0
mirror of https://github.com/tboerger/nixos-config synced 2024-11-23 03:32:08 +01:00
github.com-tboerger-nixos-c.../machines/services/acme.nix

40 lines
826 B
Nix
Raw Normal View History

{ pkgs, lib, config, options, ... }:
let
cfg = config.personal.services.acme;
in
{
options = with lib; {
personal = {
services = {
acme = {
enable = mkEnableOption "Acme";
};
};
};
};
config = with lib; mkIf cfg.enable {
security = {
acme = {
acceptTerms = true;
email = "hostmaster@boerger.ws";
certs = {
"home.boerger.ws" = {
extraDomainNames = ["*.home.boerger.ws"];
dnsProvider = "cloudflare";
credentialsFile = config.age.secrets."services/acme/credentials".path;
};
};
};
};
age.secrets."services/acme/credentials" = {
file = ../../secrets/services/acme/credentials.age;
owner = "acme";
};
};
}