From f2736f61d584976a9c1d2c101605bac29ad6fba0 Mon Sep 17 00:00:00 2001
From: Jonas Chevalier <zimbatm@zimbatm.com>
Date: Mon, 8 Mar 2021 00:22:10 +0000
Subject: [PATCH] services: move hound to build03 (#62)

---
 build01/configuration.nix                 | 2 +-
 build03/configuration.nix                 | 4 ++++
 deployment.nix                            | 7 +++++++
 terraform/cloudflare_nix-community_org.tf | 2 +-
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/build01/configuration.nix b/build01/configuration.nix
index 7a3b9c5..3bcb4af 100644
--- a/build01/configuration.nix
+++ b/build01/configuration.nix
@@ -9,7 +9,7 @@
     ../roles/gitlab-runner.nix
     ../roles/nginx.nix
     ../roles/nix-community-cache.nix
-    ../services/hound
+
     ../services/hydra
     ../services/marvin-mk2.nix
     ../services/matterbridge.nix
diff --git a/build03/configuration.nix b/build03/configuration.nix
index 53cb7a7..68dbe7d 100644
--- a/build03/configuration.nix
+++ b/build03/configuration.nix
@@ -12,6 +12,10 @@
 
     ../roles/common.nix
     ../roles/hetzner-network.nix
+    ../roles/nginx.nix
+    ../roles/nix-community-cache.nix
+
+    ../services/hound
   ];
 
   # /boot is a mirror raid
diff --git a/deployment.nix b/deployment.nix
index 47209c1..dd1b4ec 100644
--- a/deployment.nix
+++ b/deployment.nix
@@ -168,5 +168,12 @@ in
       ];
 
       deployment.targetHost = "build03.nix-community.org";
+
+      deployment.keys."nix-community-cachix.dhall" = {
+        text = secrets."nix-community-cachix.dhall";
+        destDir = "/var/lib/post-build-hook";
+        user = "root";
+        permissions = "0400";
+      };
     };
 }
diff --git a/terraform/cloudflare_nix-community_org.tf b/terraform/cloudflare_nix-community_org.tf
index 1fe4940..d5ef1d8 100644
--- a/terraform/cloudflare_nix-community_org.tf
+++ b/terraform/cloudflare_nix-community_org.tf
@@ -54,7 +54,7 @@ resource "cloudflare_record" "nix-community-org-hydra-CNAME" {
 resource "cloudflare_record" "nix-community-org-search-CNAME" {
   zone_id = local.nix_community_org_zone_id
   name    = "search"
-  value   = "build01.nix-community.org"
+  value   = "build03.nix-community.org"
   type    = "CNAME"
 }