all: use global acme_dns config
This commit is contained in:
parent
9ed9c46a41
commit
fb13e6c63a
18 changed files with 17 additions and 41 deletions
|
@ -1,13 +1,12 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
caddy.virtualHosts."jackett.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:9117
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
@ -9,14 +9,12 @@ in
|
|||
"jellyfin.local.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:8096
|
||||
'';
|
||||
};
|
||||
"jellyfin.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:8096
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
caddy.virtualHosts."radarr.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:7878
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
caddy.virtualHosts."readarr.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:8787
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
caddy.virtualHosts."sonarr.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:8989
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
@ -8,7 +8,6 @@ in
|
|||
virtualHosts."transmission.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:9091
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
domainName = "blocky.rico1.labs.adtya.xyz";
|
||||
in
|
||||
{
|
||||
|
@ -12,7 +12,6 @@ in
|
|||
virtualHosts."${domainName}" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
@ -16,28 +16,24 @@ in
|
|||
"gateway.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 192.168.0.1:80
|
||||
'';
|
||||
};
|
||||
"ap1.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 192.168.1.1:80
|
||||
'';
|
||||
};
|
||||
"ap2.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 192.168.1.2:80
|
||||
'';
|
||||
};
|
||||
"switch.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 192.168.1.3:80
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../../shared/caddy-helpers.nix) logFormat;
|
||||
domainName = "loki.labs.adtya.xyz";
|
||||
in
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ in
|
|||
virtualHosts."${domainName}" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:3100
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
domainName = "prometheus.labs.adtya.xyz";
|
||||
in
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ in
|
|||
virtualHosts."${domainName}" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:9090
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
domainName = "alertmanager.labs.adtya.xyz";
|
||||
in
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ in
|
|||
virtualHosts."${domainName}" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:9093
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
domainName = "blocky.rico2.labs.adtya.xyz";
|
||||
in
|
||||
{
|
||||
|
@ -12,7 +12,6 @@ in
|
|||
virtualHosts."${domainName}" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
domainName = "grafana.labs.adtya.xyz";
|
||||
in
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ in
|
|||
virtualHosts."${domainName}" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
reverse_proxy 127.0.0.1:9091
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -4,10 +4,4 @@
|
|||
format json
|
||||
level ERROR
|
||||
'';
|
||||
|
||||
tlsAcmeDnsChallenge = ''
|
||||
tls {
|
||||
dns hetzner {env.HETZNER_ACCESS_TOKEN}
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ in
|
|||
package = inputs.caddy.packages.${pkgs.system}.caddy;
|
||||
email = "admin@acomputer.lol";
|
||||
globalConfig = ''
|
||||
acme_dns hetzner {env.HETZNER_ACCESS_TOKEN}
|
||||
servers {
|
||||
trusted_proxies static private_ranges 10.10.10.0/24
|
||||
client_ip_headers X-Forwarded-For X-Real-IP
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (import ./caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ./caddy-helpers.nix) logFormat;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
@ -12,7 +12,6 @@ in
|
|||
virtualHosts."${vHost}" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
metrics /caddy-metrics
|
||||
handle /metrics {
|
||||
reverse_proxy ${config.services.prometheus.exporters.node.listenAddress}:${toString config.services.prometheus.exporters.node.port}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }: {
|
||||
_: {
|
||||
services = {
|
||||
promtail = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
||||
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
|
||||
domainName = "ntfy.acomputer.lol";
|
||||
in
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ in
|
|||
"${config.networking.hostName}.labs.adtya.xyz" = {
|
||||
inherit logFormat;
|
||||
extraConfig = ''
|
||||
${tlsAcmeDnsChallenge}
|
||||
handle /ntfy-metrics {
|
||||
uri replace /ntfy-metrics /metrics
|
||||
reverse_proxy ${config.services.ntfy-sh.settings.metrics-listen-http}
|
||||
|
|
Loading…
Reference in a new issue