Added swapfile and enabled swap

This commit is contained in:
2026-05-25 19:23:21 +02:00
parent 5f2eedbc53
commit 60dcf24b80

View File

@ -17,10 +17,13 @@
...
}: {
#Assign Swap to the PC
#swapDevices = [{
# device = "/swapfile";
# size = 16 * 1024; # 16GB
#}];
swapDevices = [
{
device = "/swapfile";
size = 34 * 1024; # 34GB
#randomEncryption.enable = true; #Doesnt work with hybernation
}
];
nix = {
settings.nix-path = config.nix.nixPath;
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
@ -46,6 +49,7 @@
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["quiet" "splash"];
initrd = {
systemd.enable = true; #For swap to automatically work
verbose = false;
kernelModules = ["amdgpu"];
};