diff --git a/morph/grid/hro-cloud/storage001-hardware.nix b/morph/grid/hro-cloud/storage001-hardware.nix index 37d04225462c5f176c85e15e4e4272cc68d19c3e..666c250afce0bf0902427e407c2b714aaefdcb3c 100644 --- a/morph/grid/hro-cloud/storage001-hardware.nix +++ b/morph/grid/hro-cloud/storage001-hardware.nix @@ -12,6 +12,7 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; + boot.kernel.sysctl = { "vm.swappiness" = 1; }; fileSystems."/" = { device = "/dev/disk/by-uuid/d0837e6f-72cb-4ffa-85ba-fd57bbbd9a97"; @@ -28,9 +29,10 @@ fsType = "zfs"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/45eb994e-0d1b-4903-9412-920f0ba017c9"; } - ]; + swapDevices = [ { + device = "/dev/disk/by-partuuid/9f8f4ed8-9c26-45ff-ba1b-648a3babc050"; + randomEncryption = true; + } ]; nix.maxJobs = lib.mkDefault 24; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/morph/grid/hro-cloud/storage002-hardware.nix b/morph/grid/hro-cloud/storage002-hardware.nix index c011e02f86e5da2e0f17c356e4e7507f6af97376..e12894f93f4f91339d4af0a9942fab99ea6cb942 100644 --- a/morph/grid/hro-cloud/storage002-hardware.nix +++ b/morph/grid/hro-cloud/storage002-hardware.nix @@ -12,7 +12,7 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - boot.kernel.sysctl = { "vm.swappiness" = 0; }; + boot.kernel.sysctl = { "vm.swappiness" = 1; }; fileSystems."/" = { device = "/dev/disk/by-uuid/c8d29070-c5d3-4cfb-9bb2-c14d3727c45b"; @@ -31,9 +31,10 @@ fsType = "vfat"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/51e0652f-46c9-4150-95a1-223f37154d4f"; } - ]; + swapDevices = [ { + device = "/dev/disk/by-partuuid/e0e81098-3b66-4486-b138-b320645bc698"; + randomEncryption = true; + } ]; nix.maxJobs = lib.mkDefault 24; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/morph/grid/hro-cloud/storage003-hardware.nix b/morph/grid/hro-cloud/storage003-hardware.nix index 3e4d5d8b14b753e06dc7e5fc94fa898455c4dbcc..5192883c7659c186e03d0669e99be169d7478a77 100644 --- a/morph/grid/hro-cloud/storage003-hardware.nix +++ b/morph/grid/hro-cloud/storage003-hardware.nix @@ -12,6 +12,7 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; + boot.kernel.sysctl = { "vm.swappiness" = 1; }; fileSystems."/" = { device = "/dev/disk/by-uuid/8f88c0f1-3aef-41ec-bfd7-55b4ba6c1341"; @@ -22,12 +23,16 @@ { device = "/dev/disk/by-uuid/23DC-4051"; fsType = "vfat"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/b02af75a-ea3a-47cf-ad40-c6611ee4dc09"; } - ]; + fileSystems."/storage" = { device = "root"; fsType = "zfs"; }; + + swapDevices = [ { + device = "/dev/disk/by-partuuid/f56b5104-e4a7-443e-91c8-4555eb27899e"; + randomEncryption = true; + } ]; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/morph/lib/issuer-monitoring-ovh.nix b/morph/lib/issuer-monitoring-ovh.nix index 51a51afdfa913744a0bbe9116e6ed3c8786250a3..45e6c80f40e753185dc941b2ec906590b6877a1f 100644 --- a/morph/lib/issuer-monitoring-ovh.nix +++ b/morph/lib/issuer-monitoring-ovh.nix @@ -4,9 +4,9 @@ boot.loader.grub.device = "/dev/sda"; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ]; boot.initrd.kernelModules = [ "nvme" ]; - fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; }; - + boot.kernel.sysctl = { "vm.swappiness" = 1; }; + fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; }; swapDevices = [ { device = "/var/swapfile"; diff --git a/morph/lib/issuer-payments-ovh.nix b/morph/lib/issuer-payments-ovh.nix index 6408645038566a6be038899e27df9dd81e511004..a614e7431f8ea9799e6e3a5d13f1c3356aec7b1f 100644 --- a/morph/lib/issuer-payments-ovh.nix +++ b/morph/lib/issuer-payments-ovh.nix @@ -2,11 +2,12 @@ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; boot.loader.grub.device = "/dev/sda"; + boot.kernel.sysctl = { "vm.swappiness" = 1; }; + fileSystems."/" = { device = "/dev/sda3"; fsType = "ext4"; }; swapDevices = [ { - device = "/var/swapfile"; - size = 4096; # megabytes + device = "/dev/sda2"; randomEncryption = true; } ];