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