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
2022-09-28 22:28:36 +02:00

44 lines
807 B
Nix

{ pkgs, lib, config, options, ... }:
with lib;
let
cfg = config.personal.services.acme;
in
{
options = {
personal = {
services = {
acme = {
enable = mkEnableOption "Acme";
};
};
};
};
config = mkIf cfg.enable {
security = {
acme = {
acceptTerms = true;
defaults = {
email = "hostmaster@boerger.ws";
};
certs = {
"boerger.ws" = {
extraDomainNames = [ "*.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";
};
};
}