diff options
-rw-r--r-- | lib/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/default.nix b/lib/default.nix index c6234e0..54bcf24 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -82,8 +82,10 @@ let { mount.filesystem = q: x: { fs.${x.mountpoint} = '' - mkdir -p ${x.mountpoint} - mount ${q.device} ${x.mountpoint} + if ! [ "$(mount | sed -n 's:\([^ ]\+\) on ${x.mountpoint} .*:\1:p')" = ${q.device} ]; then + mkdir -p ${x.mountpoint} + mount ${q.device} ${x.mountpoint} + fi ''; }; |