Use the same Cloudflare tunnel ID for all services

This commit is contained in:
Oliver Davies 2025-05-04 10:24:47 +01:00
parent f0d272038f
commit ec5daa9a52
4 changed files with 12 additions and 28 deletions

View file

@ -6,6 +6,11 @@ with lib;
options.homelab = {
enable = mkEnableOption "Enable homelab services and configuration";
cloudflared.tunnelId = mkOption {
example = "00000000-0000-0000-0000-000000000000";
type = types.str;
};
domain = mkOption {
description = "The base domain to use for this homelab.";
type = types.str;

View file

@ -16,11 +16,6 @@ in
type = types.str;
};
cloudflared.tunnelId = mkOption {
example = "00000000-0000-0000-0000-000000000000";
type = types.str;
};
homepage.name = mkOption {
default = "Forgejo";
type = types.str;
@ -58,7 +53,7 @@ in
};
};
cloudflared.tunnels.${cfg.cloudflared.tunnelId}.ingress = {
cloudflared.tunnels.${homelab.cloudflared.tunnelId}.ingress = {
${cfg.url} = "http://localhost:${toString config.services.${service}.settings.server.HTTP_PORT}";
};
};