add cert to nginx
This commit is contained in:
parent
8167c98703
commit
90c6d24d2b
@ -1,4 +1,23 @@
|
|||||||
{ pkgs, config, lib, ... }: {
|
{ pkgs, config, lib, ... }:
|
||||||
|
let
|
||||||
|
# creds = pkgs.writeTextFile {
|
||||||
|
# name = "cloudflare.env";
|
||||||
|
# # text = builtins.readFile ./secret/acme-cf.env;
|
||||||
|
# text = config.secrets."cloudflare.env".decrypted;
|
||||||
|
# };
|
||||||
|
in {
|
||||||
|
# security.acme = {
|
||||||
|
# email = "ataraxiadev@ataraxiadev.com";
|
||||||
|
# acceptTerms = true;
|
||||||
|
# certs."ataraxiadev.com" = {
|
||||||
|
# group = "nginx";
|
||||||
|
# email = "ataraxiadev@ataraxiadev.com";
|
||||||
|
# dnsProvider = "cloudflare";
|
||||||
|
# # credentialsFile = "${creds}";
|
||||||
|
# credentialsFile = config.secrets."cloudflare.env".decrypted;
|
||||||
|
# extraDomainNames = [ "*.ataraxiadev.com" ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
## DNS-over-TLS
|
## DNS-over-TLS
|
||||||
services.stubby = {
|
services.stubby = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -47,8 +66,11 @@
|
|||||||
appendHttpConfig = "charset utf-8;";
|
appendHttpConfig = "charset utf-8;";
|
||||||
virtualHosts = let
|
virtualHosts = let
|
||||||
default = {
|
default = {
|
||||||
forceSSL = false;
|
forceSSL = true;
|
||||||
enableACME = false;
|
enableACME = false;
|
||||||
|
sslCertificate = config.secrets."ataraxiadev.com.pem".decrypted;
|
||||||
|
sslCertificateKey = config.secrets."ataraxiadev.com.key".decrypted;
|
||||||
|
sslTrustedCertificate = config.secrets."origin-pull-ca.pem".decrypted;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
"ataraxiadev.com" = {
|
"ataraxiadev.com" = {
|
||||||
@ -71,8 +93,4 @@
|
|||||||
} // default;
|
} // default;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# security.acme = {
|
|
||||||
# email = "ataraxiadev@ataraxiadev.com";
|
|
||||||
# acceptTerms = true;
|
|
||||||
# };
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user