diff --git a/morph/grid/local/grid.nix b/morph/grid/local/grid.nix index 1e063d003a061f36408ef73dad310c47c638dbe9..41c4d0c85c9c701b797c89531b40d14bd2c2d941 100644 --- a/morph/grid/local/grid.nix +++ b/morph/grid/local/grid.nix @@ -40,7 +40,12 @@ let imports = [ gridlib.monitoring (import ./virtual-hardware.nix ({ inherit publicIPv4; })) - (gridlib.customize-monitoring hostsMap config.monitoringvpnKeyDir publicIPv4 "172.23.23.1" vpnClientIPs nodeExporterTargets [] "19.09") + (gridlib.customize-monitoring { + inherit hostsMap publicIPv4 vpnClientIPs nodeExporterTargets; + inherit (config) monitoringvpnKeyDir; + monitoringvpnIPv4 = "172.23.23.1"; + stateVersion = "19.09"; + }) ]; }; diff --git a/morph/grid/production/grid.nix b/morph/grid/production/grid.nix index 9b7c497942dab2760c5c5800d92b988ac5271e45..3f39f9773a91375081e767c62fcdd5427a44962a 100644 --- a/morph/grid/production/grid.nix +++ b/morph/grid/production/grid.nix @@ -25,7 +25,12 @@ let imports = [ gridlib.monitoring gridlib.hardware-aws - (gridlib.customize-monitoring hostsMap config.monitoringvpnKeyDir publicIPv4 "172.23.23.1" vpnClientIPs nodeExporterTargets [] "19.09") + (gridlib.customize-monitoring { + inherit hostsMap publicIPv4 vpnClientIPs nodeExporterTargets; + inherit (config) monitoringvpnKeyDir; + monitoringvpnIPv4 = "172.23.23.1"; + stateVersion = "19.09"; + }) ]; }; diff --git a/morph/grid/testing/grid.nix b/morph/grid/testing/grid.nix index e5eaf990838b5dc452461af50d1683fd85e2364c..c4ef5008eb68df589b304de4e8f56ea6e754374d 100644 --- a/morph/grid/testing/grid.nix +++ b/morph/grid/testing/grid.nix @@ -33,7 +33,12 @@ let imports = [ gridlib.monitoring gridlib.hardware-aws - (gridlib.customize-monitoring hostsMap config.monitoringvpnKeyDir publicIPv4 "172.23.23.1" vpnClientIPs nodeExporterTargets [] "19.09") + (gridlib.customize-monitoring { + inherit hostsMap publicIPv4 vpnClientIPs nodeExporterTargets; + inherit (config) monitoringvpnKeyDir; + monitoringvpnIPv4 = "172.23.23.1"; + stateVersion = "19.09"; + }) ]; }; diff --git a/morph/lib/customize-monitoring.nix b/morph/lib/customize-monitoring.nix index 5bc55810ca1778dc3ec193f79297d7443a2010aa..c81a765f2a9cd1465d062cd64d4955cdfcc743eb 100644 --- a/morph/lib/customize-monitoring.nix +++ b/morph/lib/customize-monitoring.nix @@ -1,4 +1,13 @@ -hostsMap: monitoringvpnKeyDir: publicIPv4: monitoringvpnIPv4: vpnClientIPs: nodeExporterTargets: nginxExporterTargets: stateVersion: { +{ hostsMap +, monitoringvpnKeyDir +, publicIPv4 +, monitoringvpnIPv4 +, vpnClientIPs +, nodeExporterTargets +, nginxExporterTargets ? [] +, stateVersion +, ... +}: { deployment.targetHost = publicIPv4; deployment.secrets = { "monitoringvpn-private-key".source = "${monitoringvpnKeyDir}/server.key";