From 7f6a6772dd5f2b46af77264a20c20b8ac983af8b Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Sun, 8 Mar 2026 12:45:07 +0100 Subject: [PATCH] desktop, laptop, srv-core: Use `swap` instead of `zram swap` --- hosts/desktop/hardware.nix | 4 ++++ hosts/laptop/hardware.nix | 4 ++++ hosts/srv-core/hardware.nix | 4 ++++ hosts/vps-ns/hardware.nix | 2 ++ hosts/vps-www/hardware.nix | 2 ++ profiles/core.nix | 2 -- 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hosts/desktop/hardware.nix b/hosts/desktop/hardware.nix index a69b7d9..4e4df2f 100644 --- a/hosts/desktop/hardware.nix +++ b/hosts/desktop/hardware.nix @@ -20,6 +20,10 @@ _: { "usbhid" "sd_mod" ]; + kernelParams = [ + "zswap.enabled=1" + "zswap.shrinker_enabled=1" + ]; }; # Prevent immediate wake-up from suspend caused by the logi bolt receiver diff --git a/hosts/laptop/hardware.nix b/hosts/laptop/hardware.nix index f3153a5..e38b8ca 100644 --- a/hosts/laptop/hardware.nix +++ b/hosts/laptop/hardware.nix @@ -18,6 +18,10 @@ "usb_storage" "sd_mod" ]; + kernelParams = [ + "zswap.enabled=1" + "zswap.shrinker_enabled=1" + ]; }; services = { diff --git a/hosts/srv-core/hardware.nix b/hosts/srv-core/hardware.nix index ac0e37c..888a405 100644 --- a/hosts/srv-core/hardware.nix +++ b/hosts/srv-core/hardware.nix @@ -10,6 +10,10 @@ _: { "sd_mod" "sdhci_pci" ]; + kernelParams = [ + "zswap.enabled=1" + "zswap.shrinker_enabled=1" + ]; supportedFilesystems = [ "bcachefs" ]; diff --git a/hosts/vps-ns/hardware.nix b/hosts/vps-ns/hardware.nix index 073f92f..ea58368 100644 --- a/hosts/vps-ns/hardware.nix +++ b/hosts/vps-ns/hardware.nix @@ -12,4 +12,6 @@ "sd_mod" "sr_mod" ]; + + zramSwap.enable = true; } diff --git a/hosts/vps-www/hardware.nix b/hosts/vps-www/hardware.nix index 073f92f..ea58368 100644 --- a/hosts/vps-www/hardware.nix +++ b/hosts/vps-www/hardware.nix @@ -12,4 +12,6 @@ "sd_mod" "sr_mod" ]; + + zramSwap.enable = true; } diff --git a/profiles/core.nix b/profiles/core.nix index 53f02d1..c2913bc 100644 --- a/profiles/core.nix +++ b/profiles/core.nix @@ -93,8 +93,6 @@ vimAlias = true; }; - zramSwap.enable = true; - environment.systemPackages = [ (lib.hiPrio pkgs.uutils-coreutils-noprefix) pkgs.git