From f6f5121d1e2d09f6c5b158deffd77b0e2a08838e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 29 May 2025 11:14:02 +0300 Subject: [PATCH] hosts/sarien: add swap Signed-off-by: unexplrd --- hosts/sarien/configuration.nix | 14 ++++++++++++++ hosts/sarien/disko/disk-main.nix | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index e9a2bcb..fc26d9e 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -29,6 +29,20 @@ command = "${pkgs.niri}/bin/niri-session"; }; + zramSwap.enable = true; + swapDevices = [ + { + device = "/swap/swapfile"; + size = 4 * 1024; + priority = 100; + } + { + device = "/swap/hibernate"; + size = 16 * 1024; + priority = 0; + } + ]; + module = { config = { laptop.homeRowMods = true; diff --git a/hosts/sarien/disko/disk-main.nix b/hosts/sarien/disko/disk-main.nix index 3ee66c5..b3168d3 100644 --- a/hosts/sarien/disko/disk-main.nix +++ b/hosts/sarien/disko/disk-main.nix @@ -61,6 +61,12 @@ "noatime" ]; }; + "@swap" = { + mountpoint = "/swap"; + mountOptions = [ + "noatime" + ]; + }; }; }; };