mirror of
https://github.com/tboerger/nixos-config
synced 2024-11-23 12:42:01 +01:00
44 lines
807 B
Nix
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";
|
|
};
|
|
};
|
|
}
|