some acme changes
This commit is contained in:
@@ -18,6 +18,11 @@ in {
|
||||
default = true;
|
||||
description = "use https for the adguard instance";
|
||||
};
|
||||
acme-url = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "https://127.0.0.1:8443/acme/kop-acme/directory";
|
||||
description = "acme url for the adguard instance";
|
||||
};
|
||||
};
|
||||
config =
|
||||
let
|
||||
@@ -28,14 +33,12 @@ in {
|
||||
networking.firewall.allowedTCPPorts = [ 53 ];
|
||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||
|
||||
security.acme.certs."${cfg.fqdn}".server =
|
||||
"https://127.0.0.1:8443/acme/kop-acme/directory";
|
||||
security.acme.certs."${cfg.fqdn}".server = cfg.acme-url;
|
||||
# nginx reverse proxy
|
||||
services.nginx.enable = true;
|
||||
services.nginx.virtualHosts.${cfg.fqdn} = {
|
||||
forceSSL = cfg.useHttps;
|
||||
enableACME = cfg.useHttps;
|
||||
quic = cfg.useHttps;
|
||||
http3 = cfg.useHttps;
|
||||
locations."/" = {
|
||||
proxyPass =
|
||||
"http://127.0.0.1:${toString config.services.adguardhome.port}";
|
||||
|
||||
@@ -43,13 +43,14 @@ in
|
||||
owner = "step-ca";
|
||||
group = "step-ca";
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 8443 ];
|
||||
services.step-ca = {
|
||||
enable = true;
|
||||
address = "127.0.0.1";
|
||||
address = "";
|
||||
port = 8443;
|
||||
intermediatePasswordFile = config.age.secrets.step-ca-pw.path;
|
||||
settings = {
|
||||
dnsNames = [ "localhost" "127.0.0.1" "*.home.arpa" ];
|
||||
dnsNames = [ "localhost" "127.0.0.1" "*.home.arpa" "192.168.0.10" ];
|
||||
root = pkgs.writeTextFile {
|
||||
name = "root.ca";
|
||||
text = root_ca;
|
||||
|
||||
Reference in New Issue
Block a user