mirror of
https://github.com/tboerger/nixos-config
synced 2024-11-23 03:32:08 +01:00
41 lines
770 B
Nix
41 lines
770 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;
|
|
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";
|
|
};
|
|
};
|
|
}
|