forked from DGNum/infrastructure
fix(linkal): Use http-01 challenge for certificates
This commit is contained in:
parent
56cd177d3e
commit
36c6859ef9
1 changed files with 34 additions and 34 deletions
|
@ -48,39 +48,39 @@ in {
|
|||
}) cfg.calendarGroups;
|
||||
|
||||
# Configure bind for DNS certificate validation on *.cal.dgnum.eu.
|
||||
services.bind = {
|
||||
enable = true;
|
||||
ipv4Only = true;
|
||||
extraConfig = ''
|
||||
include "${config.age.secrets."named-bind_dnskeys_conf".path}";
|
||||
'';
|
||||
|
||||
zones = [rec {
|
||||
name = "cal.dgnum.eu";
|
||||
file = "/var/db/bind/${name}";
|
||||
master = true;
|
||||
extraConfig = ''
|
||||
allow-update { key "rfc2136key.cal.dgnum.eu"; };
|
||||
'';
|
||||
}];
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 53 ];
|
||||
allowedUDPPorts = [ 53 ];
|
||||
};
|
||||
|
||||
dgn-secrets.options = [{ named-bind_dnskeys_conf.owner = "named"; }];
|
||||
|
||||
# Configure ACME for DNS certificate validation
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults = {
|
||||
dnsProvider = "rfc2136";
|
||||
credentialsFile = config.age.secrets."acme-certs_secret".path;
|
||||
dnsPropagationCheck = false;
|
||||
};
|
||||
};
|
||||
# services.bind = {
|
||||
# enable = true;
|
||||
# ipv4Only = true;
|
||||
# extraConfig = ''
|
||||
# include "${config.age.secrets."named-bind_dnskeys_conf".path}";
|
||||
# '';
|
||||
#
|
||||
# zones = [rec {
|
||||
# name = "cal.dgnum.eu";
|
||||
# file = "/var/db/bind/${name}";
|
||||
# master = true;
|
||||
# extraConfig = ''
|
||||
# allow-update { key "rfc2136key.cal.dgnum.eu"; };
|
||||
# '';
|
||||
# }];
|
||||
# };
|
||||
#
|
||||
# networking.firewall = {
|
||||
# allowedTCPPorts = [ 53 ];
|
||||
# allowedUDPPorts = [ 53 ];
|
||||
# };
|
||||
#
|
||||
# dgn-secrets.options = [{ named-bind_dnskeys_conf.owner = "named"; }];
|
||||
#
|
||||
# # Configure ACME for DNS certificate validation
|
||||
# security.acme = {
|
||||
# acceptTerms = true;
|
||||
# defaults = {
|
||||
# dnsProvider = "rfc2136";
|
||||
# credentialsFile = config.age.secrets."acme-certs_secret".path;
|
||||
# dnsPropagationCheck = false;
|
||||
# };
|
||||
# };
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
@ -89,7 +89,7 @@ in {
|
|||
{ port, ... }:
|
||||
nameValuePair "${name}.${cfg.domain}" {
|
||||
enableACME = true;
|
||||
acmeRoot = null; # Use DNS-01 validation
|
||||
# acmeRoot = null; # Use DNS-01 validation
|
||||
forceSSL = true;
|
||||
|
||||
locations."/".proxyPass =
|
||||
|
|
Loading…
Reference in a new issue