From af3321b3c2c3eb4f33a18d825ebedd609a1562c7 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Fri, 19 Sep 2025 20:52:23 +0200 Subject: [PATCH] nixos/zram: prevent implicitly disabling negative-sized ZRAM Prevent implicitly disabling a negative-sized ZRAM because disabling the ZRAM should probably always be done by disabling the zrawmSwap.enable option. Fixes: cd1b48bc3541 ("nixos: Add zram swap module") --- nixos/modules/config/zram.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/config/zram.nix b/nixos/modules/config/zram.nix index c1958d3b47ba..44db5ce9d641 100644 --- a/nixos/modules/config/zram.nix +++ b/nixos/modules/config/zram.nix @@ -49,7 +49,7 @@ in memoryPercent = lib.mkOption { default = 50; - type = lib.types.int; + type = lib.types.ints.positive; description = '' Maximum total amount of memory that can be stored in the zram swap devices (as a percentage of your total memory). Defaults to 1/2 of your total