From f2588e210b45b4e2b8dcc15f89967079632fbe6e Mon Sep 17 00:00:00 2001 From: Richie Cahill Date: Sun, 15 Sep 2024 14:31:20 -0400 Subject: [PATCH] setting up jeeves swap --- systems/common/global/default.nix | 5 ++++- systems/jeeves/hardware.nix | 25 ++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/systems/common/global/default.nix b/systems/common/global/default.nix index cc67546..6644c26 100644 --- a/systems/common/global/default.nix +++ b/systems/common/global/default.nix @@ -42,5 +42,8 @@ users.mutableUsers = lib.mkDefault true; - zramSwap.enable = true; + zramSwap = { + enable = lib.mkDefault true; + priority = 1000; + }; } diff --git a/systems/jeeves/hardware.nix b/systems/jeeves/hardware.nix index 6274009..8c4ccc7 100644 --- a/systems/jeeves/hardware.nix +++ b/systems/jeeves/hardware.nix @@ -17,8 +17,8 @@ ]; kernelModules = [ ]; luks.devices = { - "luks-root-pool-wwn-0x500a0751e6c3c01e-part2".device = "/dev/disk/by-id/wwn-0x500a0751e6c3c01e-part2"; - "luks-root-pool-wwn-0x500a0751e6c3c01c-part2".device = "/dev/disk/by-id/wwn-0x500a0751e6c3c01c-part2"; + "luks-root-pool-wwn-0x500a0751e6c3c01e-part2".device = "/dev/disk/by-id//wwn-0x500a0751e6c3c01e-part2"; + "luks-root-pool-wwn-0x500a0751e6c3c01c-part2".device = "/dev/disk/by-id//wwn-0x500a0751e6c3c01c-part2"; }; }; kernelModules = [ "kvm-amd" ]; @@ -51,7 +51,26 @@ }; }; - swapDevices = [ ]; + + + swapDevices = [ + { + device = "/dev/disk/by-id/wwn-0x500a0751e6c3c01c-part3"; + randomEncryption = { + enable = true; + allowDiscards = true; + }; + priority = 10; + } + { + device = "/dev/disk/by-id/wwn-0x500a0751e6c3c01e-part3"; + randomEncryption = { + enable = true; + allowDiscards = true; + }; + priority = 10; + } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;