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

41 lines
770 B
Nix
Raw Normal View History

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