Unverified Commit 4101d3b5 authored by Mikaela Allan's avatar Mikaela Allan
Browse files

nixos/config/swap: resolve swapfile issue !232229

parent 9b47ad66
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -275,12 +275,11 @@ in
                ''}
                ${optionalString sw.randomEncryption.enable ''
                  cryptsetup plainOpen -c ${sw.randomEncryption.cipher} -d ${sw.randomEncryption.source} \
                '' + concatMapStrings (arg: arg + " \\\n") (flatten [
                  ${concatStringsSep " \\\n" (flatten [
                    (optional (sw.randomEncryption.sectorSize != null) "--sector-size=${toString sw.randomEncryption.sectorSize}")
                    (optional (sw.randomEncryption.keySize != null) "--key-size=${toString sw.randomEncryption.keySize}")
                    (optional sw.randomEncryption.allowDiscards "--allow-discards")
                ]) + ''
                  ${sw.device} ${sw.deviceName}
                  ])} ${sw.device} ${sw.deviceName}
                  mkswap ${sw.realDevice}
                ''}
              '';