diff --git a/morph/grid/production/storage001-hardware.nix b/morph/grid/production/storage001-hardware.nix index 49809465ab1009fe23efe094080bbaa7a9f50b44..b2ca97c1db1b9721b93f2662d6e8d34189d5a0ab 100644 --- a/morph/grid/production/storage001-hardware.nix +++ b/morph/grid/production/storage001-hardware.nix @@ -31,9 +31,12 @@ fsType = "zfs"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/f986a811-4912-4e9a-8bc3-01cb6926c4c6"; } - ]; + swapDevices = [ { + device = "/var/swapfile"; + size = 8192; # megabytes + randomEncryption = true; + } ]; + nix.maxJobs = lib.mkDefault 24; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/morph/grid/production/storage002-hardware.nix b/morph/grid/production/storage002-hardware.nix index 64defbb7ff9f1cf1867c1c9d4d60c5eccfbf40d7..2f354ad29930f048f7eb20b54a1504ed87db85a1 100644 --- a/morph/grid/production/storage002-hardware.nix +++ b/morph/grid/production/storage002-hardware.nix @@ -31,9 +31,11 @@ fsType = "ext4"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/f762b5e2-bbdd-4a02-bbd9-0bf6b11e0ab5"; } - ]; + swapDevices = [ { + device = "/var/swapfile"; + size = 8192; # megabytes + randomEncryption = true; + } ]; nix.maxJobs = lib.mkDefault 24; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/morph/grid/production/storage003-hardware.nix b/morph/grid/production/storage003-hardware.nix index 1661e35447ed56845ca516d65108dd9ec2a7171b..83a37d9e164d9c8eb6f4123e96d53ea65ae4dfbe 100644 --- a/morph/grid/production/storage003-hardware.nix +++ b/morph/grid/production/storage003-hardware.nix @@ -31,7 +31,11 @@ fsType = "zfs"; }; - swapDevices = [ ]; + swapDevices = [ { + device = "/var/swapfile"; + size = 8192; # megabytes + randomEncryption = true; + } ]; nix.maxJobs = lib.mkDefault 24; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/morph/grid/production/storage004-hardware.nix b/morph/grid/production/storage004-hardware.nix index bc66beec8f154b9026075a87c8a7c707c3ae1214..1fe78a76e813605d8e181d5a858062f77114ba38 100644 --- a/morph/grid/production/storage004-hardware.nix +++ b/morph/grid/production/storage004-hardware.nix @@ -26,7 +26,11 @@ fsType = "zfs"; }; - swapDevices = [ ]; + swapDevices = [ { + device = "/var/swapfile"; + size = 8192; # megabytes + randomEncryption = true; + } ]; nix.maxJobs = lib.mkDefault 32; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/morph/grid/production/storage005-hardware.nix b/morph/grid/production/storage005-hardware.nix index ad8dc69c649c0e615d67e8e9e3e6d01196721fb7..e8f7b6391b4cb1c8d3e6059c1fd09512a0cc370b 100644 --- a/morph/grid/production/storage005-hardware.nix +++ b/morph/grid/production/storage005-hardware.nix @@ -31,7 +31,11 @@ fsType = "zfs"; }; - swapDevices = [ ]; + swapDevices = [ { + device = "/var/swapfile"; + size = 8192; # megabytes + randomEncryption = true; + } ]; nix.maxJobs = lib.mkDefault 32; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/morph/grid/testing/testing001-hardware.nix b/morph/grid/testing/testing001-hardware.nix index 3943a3755660086a646b3ab03a7660327369499f..dd2f9733796875bb9d8a549538cba5743a8727a3 100644 --- a/morph/grid/testing/testing001-hardware.nix +++ b/morph/grid/testing/testing001-hardware.nix @@ -2,6 +2,12 @@ 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" ]; networking.hostId = "10000000"; diff --git a/morph/lib/issuer-aws.nix b/morph/lib/issuer-aws.nix index 349eb0766f7c893a795701fe3484750a82bb3f6d..15ae9cda47d22c753b964ebe9fe9f68f27f77e3b 100644 --- a/morph/lib/issuer-aws.nix +++ b/morph/lib/issuer-aws.nix @@ -2,4 +2,9 @@ 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; + } ]; }