types swap: check real path of the device before mount

This commit is contained in:
lassulus 2023-07-15 19:35:18 +02:00 committed by mergify[bot]
parent 96815862d8
commit c77e66cea1

View File

@ -42,7 +42,7 @@
inherit config options;
default = {
fs.${config.device} = ''
if ! swapon --show | grep -q '^${config.device} '; then
if ! swapon --show | grep -q "^$(readlink -f ${config.device}) "; then
swapon ${config.device}
fi
'';