caddy support multi domain

This commit is contained in:
pazpi 2025-01-06 18:24:12 +01:00
parent f15e521895
commit fdcc829acf
13 changed files with 344 additions and 141 deletions

View file

@ -6,11 +6,20 @@
}:
let
tailscaleMagicDNS = "neon-dory.ts.net";
publicDomain = "pazpi.top";
tsDomain = "tegola.pro";
email = "pasettodavide@gmail.com";
in
{
age.secrets = {
searx-secret.file = ../../secrets/searx-secret.age;
tailscale-authKey.file = ../../secrets/tailscale-authKey.age;
cloudflare-tegola-apiKey = {
file = ../../secrets/cloudflare-tegola-apiKey.age;
owner = config.services.caddy.user;
group = config.services.caddy.group;
};
};
my = {
@ -18,10 +27,20 @@ in
services = {
dashy = {
enable = true;
settings = import ./dashy-settings.nix;
proxy = {
enable = true;
domain = tsDomain;
host = "caddy.internal";
};
};
media-mgr = {
proxy = {
enable = true;
domain = "tegola.pro";
domain = tsDomain;
host = "arr.internal";
};
};
@ -29,15 +48,25 @@ in
nextcloud = {
proxy = {
enable = true;
domain = "tegola.pro";
domain = tsDomain;
host = "nextcloud.internal";
};
};
searx = {
enable = true;
secretFile = config.age.secrets.searx-secret.path;
proxy = {
enable = true;
domain = tsDomain;
host = "caddy.internal";
};
};
vaultwarden = {
proxy = {
enable = true;
domain = "tegola.pro";
domain = tsDomain;
host = "vaultwarden.internal";
};
@ -48,7 +77,7 @@ in
prometheus = {
proxy = {
enable = true;
domain = "tegola.pro";
domain = tsDomain;
host = "metrics.internal";
};
};
@ -56,7 +85,7 @@ in
grafana = {
proxy = {
enable = true;
domain = "tegola.pro";
domain = tsDomain;
host = "metrics.internal";
};
};
@ -71,14 +100,27 @@ in
caddy = {
enable = true;
email = "pasettodavide@gmail.com";
domain = "tegola.pro";
domainsList = [
{
domain = tsDomain;
email = email;
cloudflareApiKeyFile = config.age.secrets.cloudflare-tegola-apiKey.path;
}
];
# email = "pasettodavide@gmail.com";
# domain = tsDomain;
# claudflareApiKeyFile = config.age.secrets.cloudflare-tegola-apiKey.path;
};
};
virtualisation = {
proxmox.enable = true;
portainer.proxy = {
enable = true;
domain = tsDomain;
host = "portainer.internal";
};
};
};

View file

@ -11,6 +11,10 @@ in
age.secrets = {
tailscale-authKey.file = ../../secrets/tailscale-authKey.age;
grafana-admin-pwd = {
file = ../../secrets/grafana-admin-pwd.age;
owner = "grafana";
};
};
my = {
@ -21,7 +25,10 @@ in
};
monitoring = {
grafana.enable = true;
grafana = {
enable = true;
adminPasswordFile = config.age.secrets.grafana-admin-pwd.path;
};
prometheus.enable = true;
loki.enable = true;
};

View file

@ -5,11 +5,22 @@
...
}:
{
age.secrets = {
nextcloud-admin-pwd = {
file = ../../secrets/nextcloud-admin-pwd.age;
owner = "nextcloud";
group = "nextcloud";
mode = "770";
};
};
my = {
utils.commons.enable = true;
services.nextcloud = {
enable = true;
adminPasswordFile = config.age.secrets.nextcloud-admin-pwd.path;
proxy.domain = "tegola.pro";
};

View file

@ -5,10 +5,14 @@
...
}:
{
age.secrets.vaultwarden-admin-pwd.file = ../../secrets/vaultwarden-admin-pwd.age;
my = {
utils.commons.enable = true;
services.vaultwarden = {
enable = true;
adminPasswordFile = config.age.secrets.vaultwarden-admin-pwd.path;
proxy.domain = "tegola.pro";
};
virtualisation.proxmox.enable = true;