diff --git a/modules/tasks/swap.nix b/modules/tasks/swap.nix index 066914a3e43a..333cf674c077 100644 --- a/modules/tasks/swap.nix +++ b/modules/tasks/swap.nix @@ -91,6 +91,7 @@ in device="${config.device}" '' } + device=$(readlink -f "$device") # Add new swap devices. if echo $unused | grep -q "^$device\$"; then unused="$(echo $unused | grep -v "^$device\$")"