From 83fce5f927e8f98cb6b5ffea38d9e3a373d56750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Tue, 10 Feb 2026 23:22:23 +0100 Subject: [PATCH] nix-cache: switch DNS to nix-cache02 - Move nix-cache CNAME from nix-cache01 to nix-cache02 - Remove actions1 CNAME (service removed) - Update proxy.nix to serve canonical domain on nix-cache02 - Promote nix-cache02 to prod tier with build-host role Co-Authored-By: Claude Opus 4.5 --- hosts/nix-cache01/configuration.nix | 2 -- hosts/nix-cache02/configuration.nix | 6 ++++-- services/nix-cache/proxy.nix | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hosts/nix-cache01/configuration.nix b/hosts/nix-cache01/configuration.nix index 1b96659..4ae45bf 100644 --- a/hosts/nix-cache01/configuration.nix +++ b/hosts/nix-cache01/configuration.nix @@ -11,8 +11,6 @@ ../../common/vm ]; - homelab.dns.cnames = [ "nix-cache" "actions1" ]; - homelab.host.role = "build-host"; fileSystems."/nix" = { diff --git a/hosts/nix-cache02/configuration.nix b/hosts/nix-cache02/configuration.nix index a4c0de9..e200642 100644 --- a/hosts/nix-cache02/configuration.nix +++ b/hosts/nix-cache02/configuration.nix @@ -13,11 +13,13 @@ ../../common/vm ]; - # Host metadata (adjust as needed) homelab.host = { - tier = "test"; # Start in test tier, move to prod after validation + tier = "prod"; + role = "build-host"; }; + homelab.dns.cnames = [ "nix-cache" ]; + # Enable Vault integration vault.enable = true; diff --git a/services/nix-cache/proxy.nix b/services/nix-cache/proxy.nix index 50340b6..ebc7763 100644 --- a/services/nix-cache/proxy.nix +++ b/services/nix-cache/proxy.nix @@ -1,10 +1,10 @@ { pkgs, config, ... }: let - # nix-cache01 serves the canonical nix-cache.home.2rjus.net - # nix-cache02 serves nix-cache02.home.2rjus.net (for testing before DNS cutover) + # nix-cache02 serves the canonical nix-cache.home.2rjus.net + # nix-cache01 serves nix-cache01.home.2rjus.net (deprecated, pending decommission) hostname = config.networking.hostName; domain = - if hostname == "nix-cache01" then + if hostname == "nix-cache02" then "nix-cache.home.2rjus.net" else "${hostname}.home.2rjus.net";