diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-09-24 13:06:27 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-09-24 13:06:27 +0300 |
commit | a63ca1bf3de482e6cb0cf0e3ce55ececc608b04b (patch) | |
tree | 43d8fdc30757cf44d445ad96b032cc304fbb6e60 /nixos/modules/system/boot/stage-1.nix | |
parent | e80b22369dd029cfd4ad9891f245daccba8d1158 (diff) | |
download | nixpkgs-a63ca1bf3de482e6cb0cf0e3ce55ececc608b04b.tar nixpkgs-a63ca1bf3de482e6cb0cf0e3ce55ececc608b04b.tar.gz nixpkgs-a63ca1bf3de482e6cb0cf0e3ce55ececc608b04b.tar.bz2 nixpkgs-a63ca1bf3de482e6cb0cf0e3ce55ececc608b04b.tar.lz nixpkgs-a63ca1bf3de482e6cb0cf0e3ce55ececc608b04b.tar.xz nixpkgs-a63ca1bf3de482e6cb0cf0e3ce55ececc608b04b.tar.zst nixpkgs-a63ca1bf3de482e6cb0cf0e3ce55ececc608b04b.zip |
stage-1 module: remove check that swap device has a label
All swap device option sets "have" a label, it's just that sometimes it's undefined. Because we set a `device` attribute when we have a label anyway it's ok to just check device prefix. Fixes #18891.
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 513c121347b..40e67fa5f8d 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -198,9 +198,10 @@ 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 - # Don't include zram devices - && !(hasPrefix "/dev/zram" sd.device)) config.swapDevices); + (filter (sd: 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) ]; |