From 3132df3446137361786db89e66bfdf562ec68810 Mon Sep 17 00:00:00 2001 From: Tom Prince <tom.prince@private.storage> Date: Thu, 26 Aug 2021 05:19:54 -0600 Subject: [PATCH] Rename the inline module from `deployment` to `grid-module`. This reduces the confusion with the nixos/modules/deployment.nix module, and should make it clearer that it can contain any configuration that applies to all hosts on the grid. --- morph/grid/local/grid.nix | 13 +++++++------ morph/grid/production/grid.nix | 11 ++++++----- morph/grid/testing/grid.nix | 11 ++++++----- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/morph/grid/local/grid.nix b/morph/grid/local/grid.nix index 51f41832..a17f4546 100644 --- a/morph/grid/local/grid.nix +++ b/morph/grid/local/grid.nix @@ -12,8 +12,9 @@ let privateKeyPath = toString ./. + "/${rawConfig.privateKeyPath}"; }; - # Configure deployment management authorization for all systems in the grid. - deployment = { + # Module with per-grid configuration + grid-module = { + # Configure deployment management authorization for all systems in the grid. services.private-storage.deployment = { authorizedKey = builtins.readFile "${config.publicKeyPath}/deploy_key.pub"; gridName = "local"; @@ -27,7 +28,7 @@ let (gridlib.customize-issuer (config // { monitoringvpnIPv4 = "172.23.23.11"; })) - deployment + grid-module ]; }; @@ -39,7 +40,7 @@ let monitoringvpnIPv4 = "172.23.23.12"; stateVersion = "19.09"; })) - deployment + grid-module ]; }; @@ -51,7 +52,7 @@ let monitoringvpnIPv4 = "172.23.23.13"; stateVersion = "19.09"; })) - deployment + grid-module ]; }; @@ -66,7 +67,7 @@ let monitoringvpnIPv4 = "172.23.23.1"; stateVersion = "19.09"; }) - deployment + grid-module ]; }; diff --git a/morph/grid/production/grid.nix b/morph/grid/production/grid.nix index 06eefdd2..fac74ccf 100644 --- a/morph/grid/production/grid.nix +++ b/morph/grid/production/grid.nix @@ -13,8 +13,9 @@ let privateKeyPath = toString ./. + "/${rawConfig.privateKeyPath}"; }; - # Configure deployment management authorization for all systems in the grid. - deployment = { + # Module with per-grid configuration + grid-module = { + # Configure deployment management authorization for all systems in the grid. services.private-storage.deployment = { authorizedKey = builtins.readFile "${config.publicKeyPath}/deploy_key.pub"; gridName = "production"; @@ -28,7 +29,7 @@ let (gridlib.customize-issuer (config // { monitoringvpnIPv4 = "172.23.23.11"; })) - deployment + grid-module ]; }; @@ -43,7 +44,7 @@ let monitoringvpnIPv4 = "172.23.23.1"; stateVersion = "19.09"; }) - deployment + grid-module ]; }; @@ -71,7 +72,7 @@ let })) # Also configure deployment management authorization - deployment + grid-module ]; # And supply configuration for those hardware / network / bootloader diff --git a/morph/grid/testing/grid.nix b/morph/grid/testing/grid.nix index 7b06c99e..9e03a500 100644 --- a/morph/grid/testing/grid.nix +++ b/morph/grid/testing/grid.nix @@ -13,8 +13,9 @@ let privateKeyPath = toString ./. + "/${rawConfig.privateKeyPath}"; }; - # Configure deployment management authorization for all systems in the grid. - deployment = { + # Module with per-grid configuration + grid-module = { + # Configure deployment management authorization for all systems in the grid. services.private-storage.deployment = { authorizedKey = builtins.readFile "${config.publicKeyPath}/deploy_key.pub"; gridName = "testing"; @@ -28,7 +29,7 @@ let (gridlib.customize-issuer (config // { monitoringvpnIPv4 = "172.23.23.11"; })) - deployment + grid-module ]; }; @@ -41,7 +42,7 @@ let monitoringvpnIPv4 = "172.23.23.12"; stateVersion = "19.03"; })) - deployment + grid-module ]; }; @@ -56,7 +57,7 @@ let monitoringvpnIPv4 = "172.23.23.1"; stateVersion = "19.09"; }) - deployment + grid-module ]; }; -- GitLab