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";