From 58af59fd0b6a2809a97b67e7f87959dd3cedb748 Mon Sep 17 00:00:00 2001 From: Henri Rosten Date: Wed, 7 Feb 2024 07:13:38 +0200 Subject: [PATCH] hosts: move azure host configs to subdir Move azure nix host configurations to their own subdirectory to avoid confusion with the ficolo (e.g. 'binarycache') and azure ('binary-cache') nix configurations. Signed-off-by: Henri Rosten --- .../binary-cache/configuration.nix | 2 +- hosts/{ => azure}/builder/configuration.nix | 2 +- .../jenkins-controller/configuration.nix | 2 +- hosts/default.nix | 24 +++++++++---------- terraform/binary-cache.tf | 2 +- terraform/builder.tf | 2 +- terraform/jenkins-controller.tf | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) rename hosts/{ => azure}/binary-cache/configuration.nix (99%) rename hosts/{ => azure}/builder/configuration.nix (98%) rename hosts/{ => azure}/jenkins-controller/configuration.nix (99%) diff --git a/hosts/binary-cache/configuration.nix b/hosts/azure/binary-cache/configuration.nix similarity index 99% rename from hosts/binary-cache/configuration.nix rename to hosts/azure/binary-cache/configuration.nix index 90664861..8d347a28 100644 --- a/hosts/binary-cache/configuration.nix +++ b/hosts/azure/binary-cache/configuration.nix @@ -9,7 +9,7 @@ ... }: { imports = [ - ../azure-common-2.nix + ../../azure-common-2.nix self.nixosModules.service-openssh ]; diff --git a/hosts/builder/configuration.nix b/hosts/azure/builder/configuration.nix similarity index 98% rename from hosts/builder/configuration.nix rename to hosts/azure/builder/configuration.nix index 91aa04de..bc2e7731 100644 --- a/hosts/builder/configuration.nix +++ b/hosts/azure/builder/configuration.nix @@ -8,7 +8,7 @@ ... }: { imports = [ - ../azure-common-2.nix + ../../azure-common-2.nix self.nixosModules.service-openssh self.nixosModules.service-remote-build ]; diff --git a/hosts/jenkins-controller/configuration.nix b/hosts/azure/jenkins-controller/configuration.nix similarity index 99% rename from hosts/jenkins-controller/configuration.nix rename to hosts/azure/jenkins-controller/configuration.nix index bbece7db..715478be 100644 --- a/hosts/jenkins-controller/configuration.nix +++ b/hosts/azure/jenkins-controller/configuration.nix @@ -52,7 +52,7 @@ ''; in { imports = [ - ../azure-common-2.nix + ../../azure-common-2.nix self.nixosModules.service-openssh ]; diff --git a/hosts/default.nix b/hosts/default.nix index 4ca43c52..c1dd4146 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -19,17 +19,21 @@ # make self and inputs available in nixos modules specialArgs = {inherit self inputs;}; in { - binarycache = lib.nixosSystem { + az-binary-cache = lib.nixosSystem { inherit specialArgs; - modules = [./binarycache/configuration.nix]; + modules = [./azure/binary-cache/configuration.nix]; + }; + az-builder = lib.nixosSystem { + inherit specialArgs; + modules = [./azure/builder/configuration.nix]; }; - binary-cache = lib.nixosSystem { + az-jenkins-controller = lib.nixosSystem { inherit specialArgs; - modules = [./binary-cache/configuration.nix]; + modules = [./azure/jenkins-controller/configuration.nix]; }; - builder = lib.nixosSystem { + binarycache = lib.nixosSystem { inherit specialArgs; - modules = [./builder/configuration.nix]; + modules = [./binarycache/configuration.nix]; }; ficolobuild3 = lib.nixosSystem { inherit specialArgs; @@ -39,17 +43,13 @@ inherit specialArgs; modules = [./ficolobuild/build4.nix]; }; - jenkins-controller = lib.nixosSystem { + monitoring = lib.nixosSystem { inherit specialArgs; - modules = [./jenkins-controller/configuration.nix]; + modules = [./monitoring/configuration.nix]; }; prbuilder = lib.nixosSystem { inherit specialArgs; modules = [./prbuilder/configuration.nix]; }; - monitoring = lib.nixosSystem { - inherit specialArgs; - modules = [./monitoring/configuration.nix]; - }; }; } diff --git a/terraform/binary-cache.tf b/terraform/binary-cache.tf index 5719fb4a..3eafc72a 100644 --- a/terraform/binary-cache.tf +++ b/terraform/binary-cache.tf @@ -5,7 +5,7 @@ module "binary_cache_image" { source = "./modules/azurerm-nix-vm-image" - nix_attrpath = "outputs.nixosConfigurations.binary-cache.config.system.build.azureImage" + nix_attrpath = "outputs.nixosConfigurations.az-binary-cache.config.system.build.azureImage" nix_entrypoint = "${path.module}/.." name = "binary-cache" diff --git a/terraform/builder.tf b/terraform/builder.tf index 8cfb5831..99deddd0 100644 --- a/terraform/builder.tf +++ b/terraform/builder.tf @@ -5,7 +5,7 @@ module "builder_image" { source = "./modules/azurerm-nix-vm-image" - nix_attrpath = "outputs.nixosConfigurations.builder.config.system.build.azureImage" + nix_attrpath = "outputs.nixosConfigurations.az-builder.config.system.build.azureImage" nix_entrypoint = "${path.module}/.." name = "builder" diff --git a/terraform/jenkins-controller.tf b/terraform/jenkins-controller.tf index de997d07..540fce27 100644 --- a/terraform/jenkins-controller.tf +++ b/terraform/jenkins-controller.tf @@ -6,7 +6,7 @@ module "jenkins_controller_image" { source = "./modules/azurerm-nix-vm-image" - nix_attrpath = "outputs.nixosConfigurations.jenkins-controller.config.system.build.azureImage" + nix_attrpath = "outputs.nixosConfigurations.az-jenkins-controller.config.system.build.azureImage" nix_entrypoint = "${path.module}/.." name = "jenkins-controller"