Skip to content
Snippets Groups Projects
Commit f0dca820 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Break the networking.hostName tie in hardware-aws

Using AWS is what causes it so using AWS can be what fixes it, too.
parent 77250c2c
Branches
No related tags found
No related merge requests found
...@@ -21,8 +21,7 @@ let ...@@ -21,8 +21,7 @@ let
}; };
}; };
payments = {name, ...}: { payments = {
networking.hostName = name;
imports = [ imports = [
gridlib.issuer gridlib.issuer
gridlib.hardware-aws gridlib.hardware-aws
...@@ -33,8 +32,7 @@ let ...@@ -33,8 +32,7 @@ let
]; ];
}; };
monitoring = {name, ...}: { monitoring = {
networking.hostName = name;
imports = [ imports = [
gridlib.monitoring gridlib.monitoring
gridlib.hardware-aws gridlib.hardware-aws
......
...@@ -21,8 +21,7 @@ let ...@@ -21,8 +21,7 @@ let
}; };
}; };
payments = {name, ...}: { payments = {
networking.hostName = name;
imports = [ imports = [
gridlib.issuer gridlib.issuer
gridlib.hardware-aws gridlib.hardware-aws
...@@ -33,10 +32,10 @@ let ...@@ -33,10 +32,10 @@ let
]; ];
}; };
storage001 = {name, ...}: { storage001 = {
networking.hostName = name;
imports = [ imports = [
gridlib.storage gridlib.storage
gridlib.hardware-aws
./testing001-hardware.nix ./testing001-hardware.nix
(gridlib.customize-storage (config // { (gridlib.customize-storage (config // {
monitoringvpnIPv4 = "172.23.23.12"; monitoringvpnIPv4 = "172.23.23.12";
...@@ -46,8 +45,7 @@ let ...@@ -46,8 +45,7 @@ let
]; ];
}; };
monitoring = {name, ...}: { monitoring = {
networking.hostName = name;
imports = [ imports = [
gridlib.monitoring gridlib.monitoring
gridlib.hardware-aws gridlib.hardware-aws
......
{ {
imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ];
ec2.hvm = true;
boot.kernel.sysctl = { "vm.swappiness" = 0; };
swapDevices = [ {
device = "/var/swapfile";
size = 8192; # megabytes
randomEncryption = true;
} ];
boot.supportedFilesystems = [ "zfs" ]; boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "10000000"; networking.hostId = "10000000";
......
{ lib, ... }: { { name, lib, ... }: {
imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ]; imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ];
# amazon-image.nix isn't quite aware of nvme-attached storage so give it a
# little help configuring grub.
boot.loader.grub.device = lib.mkForce "/dev/nvme0n1";
ec2.hvm = true; ec2.hvm = true;
boot.kernel.sysctl = { "vm.swappiness" = 0; }; boot.kernel.sysctl = { "vm.swappiness" = 0; };
swapDevices = [ { swapDevices = [ {
...@@ -12,4 +7,14 @@ ...@@ -12,4 +7,14 @@
size = 8192; # megabytes size = 8192; # megabytes
randomEncryption = true; randomEncryption = true;
} ]; } ];
# Break the tie between AWS and morph for the hostname by forcing the
# morph-supplied name. See also
# <https://github.com/DBCDK/morph/issues/146>.
networking.hostName = name;
# amazon-image.nix isn't quite aware of nvme-attached storage so give it a
# little help configuring grub.
boot.loader.grub.device = lib.mkForce "/dev/nvme0n1";
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment