From c77e66cea1d4caa698993c451ea17bbc5478bf20 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 15 Jul 2023 19:35:18 +0200 Subject: [PATCH] types swap: check real path of the device before mount --- lib/types/swap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 '';