modules: services: nginx: fix SSL renewal
See this issue [1]. [1]: https://github.com/go-acme/lego/issues/1772.
This commit is contained in:
parent
b85a98c377
commit
1e10c6630b
|
@ -3,6 +3,8 @@
|
||||||
let
|
let
|
||||||
cfg = config.my.services.nginx;
|
cfg = config.my.services.nginx;
|
||||||
|
|
||||||
|
domain = config.networking.domain;
|
||||||
|
|
||||||
virtualHostOption = with lib; types.submodule {
|
virtualHostOption = with lib; types.submodule {
|
||||||
options = {
|
options = {
|
||||||
subdomain = mkOption {
|
subdomain = mkOption {
|
||||||
|
@ -392,10 +394,6 @@ in
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
# Use DNS wildcard certificate
|
# Use DNS wildcard certificate
|
||||||
certs =
|
certs =
|
||||||
let
|
|
||||||
domain = config.networking.domain;
|
|
||||||
in
|
|
||||||
with pkgs;
|
|
||||||
{
|
{
|
||||||
"${domain}" = {
|
"${domain}" = {
|
||||||
extraDomainNames = [ "*.${domain}" ];
|
extraDomainNames = [ "*.${domain}" ];
|
||||||
|
@ -405,6 +403,15 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services."acme-${domain}" = {
|
||||||
|
serviceConfig = {
|
||||||
|
Environment = [
|
||||||
|
# Since I do a "weird" setup with a wildcard CNAME
|
||||||
|
"LEGO_DISABLE_CNAME_SUPPORT=true"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.grafana.provision.dashboards.settings.providers = lib.mkIf cfg.monitoring.enable [
|
services.grafana.provision.dashboards.settings.providers = lib.mkIf cfg.monitoring.enable [
|
||||||
{
|
{
|
||||||
name = "NGINX";
|
name = "NGINX";
|
||||||
|
|
Loading…
Reference in a new issue