From ec0f6231af066a6a74649cbc387c4fbc9ccb7e65 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 6 Aug 2023 14:49:35 +0100 Subject: [PATCH] modules: services: woodpecker: use 'ci' subdomain --- modules/services/woodpecker/server/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/services/woodpecker/server/default.nix b/modules/services/woodpecker/server/default.nix index 152e707..61650f8 100644 --- a/modules/services/woodpecker/server/default.nix +++ b/modules/services/woodpecker/server/default.nix @@ -9,7 +9,7 @@ in environment = { WOODPECKER_OPEN = "true"; - WOODPECKER_HOST = "https://woodpecker.${config.networking.domain}"; + WOODPECKER_HOST = "https://ci.${config.networking.domain}"; WOODPECKER_DATABASE_DRIVER = "postgres"; WOODPECKER_DATABASE_DATASOURCE = "postgres:///woodpecker?host=/run/postgresql"; WOODPECKER_ADMIN = "${cfg.admin}"; @@ -53,9 +53,14 @@ in my.services.nginx.virtualHosts = [ { - subdomain = "woodpecker"; + subdomain = "ci"; inherit (cfg) port; } + # Redirect `woodpecker.` to actual CI subdomain + { + subdomain = "woodpecker"; + redirect = config.services.woodpecker-server.environment.WOODPECKER_HOST; + } # I might want to be able to RPC from other hosts in the future { subdomain = "woodpecker-rpc";