Brendan Golden
13eba34a56
Some checks failed
Build_Deploy / linter (push) Successful in 5s
Build_Deploy / build (push) Successful in 14s
Build_Deploy / deploy_dns (push) Successful in 54s
Build_Deploy / deploy_active (active) (push) Successful in 48s
Build_Deploy / deploy_active (active-core) (push) Failing after 40s
Build_Deploy / deploy_active (active-ext) (push) Successful in 42s
48 lines
1,000 B
Nix
48 lines
1,000 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; let
|
|
name = "acme";
|
|
cfg = config.services.skynet."${name}";
|
|
in {
|
|
imports = [];
|
|
|
|
options.services.skynet."${name}" = {
|
|
domains = lib.mkOption {
|
|
default = [];
|
|
type = lib.types.listOf lib.types.str;
|
|
description = ''
|
|
A list of domains to use for this server.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = {
|
|
# group that will own the certificates
|
|
users.groups.acme = {};
|
|
|
|
age.secrets.acme.file = ../secrets/dns_certs.secret.age;
|
|
|
|
security.acme = {
|
|
preliminarySelfsigned = false;
|
|
acceptTerms = true;
|
|
|
|
defaults = {
|
|
email = "admin_acme@skynet.ie";
|
|
credentialsFile = config.age.secrets.acme.path;
|
|
};
|
|
|
|
certs = {
|
|
"skynet" = {
|
|
# we use our own dns authorative server for verifying we own the domain.
|
|
dnsProvider = "rfc2136";
|
|
domain = "skynet.ie";
|
|
extraDomainNames = lists.naturalSort cfg.domains;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|