From c74bd8a23851f3f0ede7c33bba70a4058ecf3cc2 Mon Sep 17 00:00:00 2001 From: Yuto Nishida Date: Sat, 1 Nov 2025 15:47:14 -0700 Subject: [PATCH] Refactor yart.me octodns config --- eight/octodns-config.nix | 124 ++--------------------------------- eight/per-domain/yart.me.nix | 120 +++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 120 deletions(-) create mode 100644 eight/per-domain/yart.me.nix diff --git a/eight/octodns-config.nix b/eight/octodns-config.nix index fdf2109..d218b8b 100644 --- a/eight/octodns-config.nix +++ b/eight/octodns-config.nix @@ -9,6 +9,10 @@ in { inherit generated; configurations-by-file = self; }; + "yart.me.yaml" = import ./per-domain/yart.me.nix { + inherit generated; + configurations-by-file = self; + }; "production.yaml" = { providers = { config = { @@ -39,126 +43,6 @@ in { "andref.app." = self."production.yaml".zones."yart.me."; }; }; - "yart.me.yaml" = { - "" = [ - { - octodns = { - cloudflare = { - auto-ttl = true; - comment = "this record was set by terraform from starptr/yart"; - ignored = true; - }; - }; - ttl = 300; - type = "ALIAS"; - value = "yart.vercel.app."; - } - { - octodns = { - cloudflare = { - auto-ttl = true; - comment = "Fastmail"; - }; - }; - ttl = 300; - type = "MX"; - values = [ - { - exchange = "in1-smtp.messagingengine.com."; - preference = 10; - } - { - exchange = "in2-smtp.messagingengine.com."; - preference = 20; - } - ]; - } - { - octodns = { - cloudflare = { - auto-ttl = true; - comment = "Fastmail spf"; - }; - }; - ttl = 300; - type = "TXT"; - value = "v=spf1 include:spf.messagingengine.com ?all"; - } - ]; - "*.cap" = { - octodns = { - cloudflare = { - auto-ttl = true; - }; - }; - ttl = 300; - type = "A"; - value = "143.198.246.238"; - }; - "api" = { - octodns = { - cloudflare = { - auto-ttl = true; - }; - }; - ttl = 300; - type = "CNAME"; - value = "now-playing.cap.yart.me."; - }; - "fm1._domainkey" = { - octodns = { - cloudflare = { - auto-ttl = true; - comment = "Fastmail dkim"; - }; - }; - ttl = 300; - type = "CNAME"; - value = "fm1.yart.me.dkim.fmhosted.com."; - }; - "fm2._domainkey" = { - octodns = { - cloudflare = { - auto-ttl = true; - comment = "Fastmail dkim"; - }; - }; - ttl = 300; - type = "CNAME"; - value = "fm2.yart.me.dkim.fmhosted.com."; - }; - "fm3._domainkey" = { - octodns = { - cloudflare = { - auto-ttl = true; - comment = "Fastmail dkim"; - }; - }; - ttl = 300; - type = "CNAME"; - value = "fm3.yart.me.dkim.fmhosted.com."; - }; - "spotify" = { - octodns = { - cloudflare = { - auto-ttl = true; - }; - }; - ttl = 300; - type = "CNAME"; - value = "spotify.yart.me.cdn.cloudflare.net."; - }; - "uni2code" = { - octodns = { - cloudflare = { - auto-ttl = true; - }; - }; - ttl = 300; - type = "CNAME"; - value = "uni2code.netlify.app."; - }; - }; "yut.to.yaml" = { "" = [ { diff --git a/eight/per-domain/yart.me.nix b/eight/per-domain/yart.me.nix new file mode 100644 index 0000000..ae9739b --- /dev/null +++ b/eight/per-domain/yart.me.nix @@ -0,0 +1,120 @@ +{ configurations-by-file, generated }: { + "" = [ + { + octodns = { + cloudflare = { + auto-ttl = true; + comment = "this record was set by terraform from starptr/yart"; + ignored = true; + }; + }; + ttl = 300; + type = "ALIAS"; + value = "yart.vercel.app."; + } + { + octodns = { + cloudflare = { + auto-ttl = true; + comment = "Fastmail"; + }; + }; + ttl = 300; + type = "MX"; + values = [ + { + exchange = "in1-smtp.messagingengine.com."; + preference = 10; + } + { + exchange = "in2-smtp.messagingengine.com."; + preference = 20; + } + ]; + } + { + octodns = { + cloudflare = { + auto-ttl = true; + comment = "Fastmail spf"; + }; + }; + ttl = 300; + type = "TXT"; + value = "v=spf1 include:spf.messagingengine.com ?all"; + } + ]; + "*.cap" = { + octodns = { + cloudflare = { + auto-ttl = true; + }; + }; + ttl = 300; + type = "A"; + value = "143.198.246.238"; + }; + "api" = { + octodns = { + cloudflare = { + auto-ttl = true; + }; + }; + ttl = 300; + type = "CNAME"; + value = "now-playing.cap.yart.me."; + }; + "fm1._domainkey" = { + octodns = { + cloudflare = { + auto-ttl = true; + comment = "Fastmail dkim"; + }; + }; + ttl = 300; + type = "CNAME"; + value = "fm1.yart.me.dkim.fmhosted.com."; + }; + "fm2._domainkey" = { + octodns = { + cloudflare = { + auto-ttl = true; + comment = "Fastmail dkim"; + }; + }; + ttl = 300; + type = "CNAME"; + value = "fm2.yart.me.dkim.fmhosted.com."; + }; + "fm3._domainkey" = { + octodns = { + cloudflare = { + auto-ttl = true; + comment = "Fastmail dkim"; + }; + }; + ttl = 300; + type = "CNAME"; + value = "fm3.yart.me.dkim.fmhosted.com."; + }; + "spotify" = { + octodns = { + cloudflare = { + auto-ttl = true; + }; + }; + ttl = 300; + type = "CNAME"; + value = "spotify.yart.me.cdn.cloudflare.net."; + }; + "uni2code" = { + octodns = { + cloudflare = { + auto-ttl = true; + }; + }; + ttl = 300; + type = "CNAME"; + value = "uni2code.netlify.app."; + }; +} \ No newline at end of file -- 2.51.2