diff --git a/lib/types/swap.nix b/lib/types/swap.nix index ffd6f26..1e8cb9f 100644 --- a/lib/types/swap.nix +++ b/lib/types/swap.nix @@ -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 '';