summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-1.nix
diff options
context:
space:
mode:
authorJulien Langlois <yourstruly@julienlanglois.me>2016-08-17 00:20:27 -0700
committerJulien Langlois <yourstruly@julienlanglois.me>2016-08-17 00:21:47 -0700
commit552c30c15529426718d221f3c1903e93188e8730 (patch)
treed1de513948da45cc5dc8448f512e26743035bbac /nixos/modules/system/boot/stage-1.nix
parentefab1cb928020434054e00b25a8867331da738ec (diff)
downloadnixlib-552c30c15529426718d221f3c1903e93188e8730.tar
nixlib-552c30c15529426718d221f3c1903e93188e8730.tar.gz
nixlib-552c30c15529426718d221f3c1903e93188e8730.tar.bz2
nixlib-552c30c15529426718d221f3c1903e93188e8730.tar.lz
nixlib-552c30c15529426718d221f3c1903e93188e8730.tar.xz
nixlib-552c30c15529426718d221f3c1903e93188e8730.tar.zst
nixlib-552c30c15529426718d221f3c1903e93188e8730.zip
stage-1: exclude zram devices from resumeDevices
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r--nixos/modules/system/boot/stage-1.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index 70429e9c0a22..baeba1d6b31d 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -198,7 +198,9 @@ let
       preLVMCommands preDeviceCommands postDeviceCommands postMountCommands preFailCommands kernelModules;
 
     resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}")
-                    (filter (sd: (sd ? label || hasPrefix "/dev/" sd.device) && !sd.randomEncryption) config.swapDevices);
+                    (filter (sd: (sd ? label || hasPrefix "/dev/" sd.device) && !sd.randomEncryption 
+                    # Don't include zram devices
+                    && !(hasPrefix "/dev/zram" sd.device)) config.swapDevices);
 
     fsInfo =
       let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType (builtins.concatStringsSep "," fs.options) ];