Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dns/nixos.org.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ D("nixos.org",
// wiki
A("wiki", "65.21.240.250"),
AAAA("wiki", "2a01:4f9:c012:8178::"),
// Direct access to wiki server in Helsinki (for deployments)
A("he1.wiki", "65.21.240.250"),
AAAA("he1.wiki", "2a01:4f9:c012:8178::"),
DMARC_BUILDER({
label: "wiki",
policy: "none"
Expand All @@ -166,6 +169,10 @@ D("nixos.org",
}),
TXT("mail._domainkey.wiki", "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDa+KjIljYr3q5MWWK7sEYzjR8OcA32zBh9BCPo6/HlY1q2ODTYsmE/FDZWpYMzM5z+ddnuGYdXia322XnZaNpZNoq1TbGYuQ5DsgAEK09CGoLuzONg3PSXTrkG7E2Sd6wstwHGJ5FHxSLKtNoWkknt9F5XAFZgXapO0w54p+BWvwIDAQAB"),

// test.wiki subdomain with Fastly
CNAME("test.wiki", "dualstack.v2.shared.global.fastly.net."),
CNAME("_acme-challenge.test.wiki", "zsz0meyel8hxoy9dtb.fastly-validations.com."),

// cloudflare pages
CNAME("20th", "20th-nix.pages.dev."),

Expand Down
63 changes: 63 additions & 0 deletions terraform/wiki-test.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
locals {
wiki_test_domain = "test.wiki.nixos.org"
}

resource "fastly_service_vcl" "wiki-test" {
name = local.wiki_test_domain
default_ttl = 86400

backend {
address = "he1.wiki.nixos.org"
auto_loadbalance = false
between_bytes_timeout = 10000
connect_timeout = 5000
error_threshold = 0
first_byte_timeout = 15000
max_conn = 200
name = "wiki_backend"
port = 443
# Shield location for Helsinki backend
shield = "hel-helsinki-fi"
ssl_cert_hostname = "he1.wiki.nixos.org"
ssl_check_cert = true
use_ssl = true
weight = 100
}

domain {
name = local.wiki_test_domain
}

# Pass through the original Host header
header {
destination = "http.Host"
type = "request"
action = "set"
name = "Set Host Header"
source = "\"wiki.nixos.org\""
}

logging_s3 {
name = "${local.wiki_test_domain}-to-s3"
bucket_name = local.fastlylogs["bucket_name"]
compression_codec = "zstd"
domain = local.fastlylogs["s3_domain"]
format = local.fastlylogs["format"]
format_version = 2
path = "${local.wiki_test_domain}/"
period = local.fastlylogs["period"]
message_type = "blank"
s3_iam_role = local.fastlylogs["iam_role_arn"]
}
}

resource "fastly_tls_subscription" "wiki-test" {
domains = [for domain in fastly_service_vcl.wiki-test.domain : domain.name]
configuration_id = local.fastly_tls12_sni_configuration_id
certificate_authority = "lets-encrypt"
}

output "wiki_test_acme_challenge" {
value = fastly_tls_subscription.wiki-test.managed_dns_challenges
description = "ACME challenge records for test.wiki.nixos.org - add these to DNS"
}