From b7073c85e19eecf354e2f976e558d0b8c8b416e7 Mon Sep 17 00:00:00 2001
From: Florian Sesser <florian@private.storage>
Date: Wed, 14 Jul 2021 17:04:32 +0000
Subject: [PATCH] Fix: morph 1.6 and amazon-image from 21.05 both provide a
 default for hostName

... This breaks the tie, thx to https://github.com/DBCDK/morph/issues/146
---
 morph/grid/production/grid.nix | 6 ++++--
 morph/grid/testing/grid.nix    | 9 ++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/morph/grid/production/grid.nix b/morph/grid/production/grid.nix
index 1aa60561..ec21972c 100644
--- a/morph/grid/production/grid.nix
+++ b/morph/grid/production/grid.nix
@@ -13,7 +13,8 @@ let
     privateKeyPath = toString ./. + "/${rawConfig.privateKeyPath}";
   };
 
-  payments = {
+  payments = {name, ...}: {
+    networking.hostName = name;
     imports = [
       gridlib.issuer
       gridlib.hardware-aws
@@ -23,7 +24,8 @@ let
     ];
   };
 
-  monitoring = {
+  monitoring = {name, ...}: {
+    networking.hostName = name;
     imports = [
       gridlib.monitoring
       gridlib.hardware-aws
diff --git a/morph/grid/testing/grid.nix b/morph/grid/testing/grid.nix
index 996b1fba..bc4252fc 100644
--- a/morph/grid/testing/grid.nix
+++ b/morph/grid/testing/grid.nix
@@ -13,7 +13,8 @@ let
     privateKeyPath = toString ./. + "/${rawConfig.privateKeyPath}";
   };
 
-  payments = {
+  payments = {name, ...}: {
+    networking.hostName = name;
     imports = [
       gridlib.issuer
       gridlib.hardware-aws
@@ -23,7 +24,8 @@ let
     ];
   };
 
-  storage001 = {
+  storage001 = {name, ...}: {
+    networking.hostName = name;
     imports = [
       gridlib.storage
       ./testing001-hardware.nix
@@ -34,7 +36,8 @@ let
     ];
   };
 
-  monitoring = {
+  monitoring = {name, ...}: {
+    networking.hostName = name;
     imports = [
       gridlib.monitoring
       gridlib.hardware-aws
-- 
GitLab