From 60dcf24b8085bdd76cbcad0df09d673676b593e8 Mon Sep 17 00:00:00 2001 From: Cookiez Date: Mon, 25 May 2026 19:23:21 +0200 Subject: [PATCH] Added swapfile and enabled swap --- modules/configuration.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/configuration.nix b/modules/configuration.nix index a4bf96c..4accfb6 100644 --- a/modules/configuration.nix +++ b/modules/configuration.nix @@ -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"]; };