nixos/swap: allow luks discards if swap discards are enabled
This commit is contained in:
parent
68d0c4fc9c
commit
11c0384bf0
1 changed files with 1 additions and 1 deletions
|
@ -215,7 +215,7 @@ in
|
|||
fi
|
||||
''}
|
||||
${optionalString sw.randomEncryption.enable ''
|
||||
cryptsetup plainOpen -c ${sw.randomEncryption.cipher} -d ${sw.randomEncryption.source} ${sw.device} ${sw.deviceName}
|
||||
cryptsetup plainOpen -c ${sw.randomEncryption.cipher} -d ${sw.randomEncryption.source} ${optionalString (sw.discardPolicy != null) "--allow-discards"} ${sw.device} ${sw.deviceName}
|
||||
mkswap ${sw.realDevice}
|
||||
''}
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue