Skip to content
Snippets Groups Projects
Commit 645e30ce authored by Florian Sesser's avatar Florian Sesser
Browse files

Add the same 8 GB of encrypted swap space to all hosts

For consistency reasons: Even if they had a perfectly good swap
partition already, and also for AWS hosts.
parent a9bac240
No related branches found
No related tags found
3 merge requests!140Merge staging into production,!118Merge develop into staging,!103Secure swap space and have 8 GB of swap consistently on all machines.
Pipeline #712 passed
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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";
......
......@@ -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;
} ];
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment