swap: don't activate random encrypted swap files

This requires more code and is not implemented just now.
This commit is contained in:
Jörg Thalheim authored and mergify[bot] committed 2023-11-25 15:47:29 +00:00
1 parent 2d7d77878c
commit 3cb78c93e6
3 files changed
+14 -13

No files matched your search

+2 -1
View File
@@ -47,7 +47,8 @@
};
_mount = diskoLib.mkMountOption {
inherit config options;
default = {
# TODO: we don't support encrypted swap yet
default = lib.optionalAttrs (!config.randomEncryption) {
fs.${config.device} = ''
if ! swapon --show | grep -q "^$(readlink -f ${config.device}) "; then
swapon ${config.device}