about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRicardo M. Correia <rcorreia@wizy.org>2014-12-29 02:53:37 +0100
committerRicardo M. Correia <rcorreia@wizy.org>2015-01-21 17:39:53 +0100
commit1b6607720539e42c9cc497bebafccc900674da63 (patch)
treebf98b41bd08065d1e06c0cf89390b60e528a0008 /nixos
parentf637e27138d4af7769650a929f203ae87eb9c1ca (diff)
downloadnixlib-1b6607720539e42c9cc497bebafccc900674da63.tar
nixlib-1b6607720539e42c9cc497bebafccc900674da63.tar.gz
nixlib-1b6607720539e42c9cc497bebafccc900674da63.tar.bz2
nixlib-1b6607720539e42c9cc497bebafccc900674da63.tar.lz
nixlib-1b6607720539e42c9cc497bebafccc900674da63.tar.xz
nixlib-1b6607720539e42c9cc497bebafccc900674da63.tar.zst
nixlib-1b6607720539e42c9cc497bebafccc900674da63.zip
nixos: Don't do filesystem checks on ZFS or NFS filesystems
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/tasks/filesystems.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix
index 64a20034f3cc..c6f2f072352e 100644
--- a/nixos/modules/tasks/filesystems.nix
+++ b/nixos/modules/tasks/filesystems.nix
@@ -142,7 +142,10 @@ in
       ++ config.system.fsPackages;
 
     environment.etc.fstab.text =
-      ''
+      let
+        fsToSkipCheck = [ "none" "btrfs" "zfs" "tmpfs" "nfs" ];
+        skipCheck = fs: fs.noCheck || fs.device == "none" || builtins.elem fs.fsType fsToSkipCheck;
+      in ''
         # This is a generated file.  Do not edit!
 
         # Filesystems.
@@ -154,7 +157,7 @@ in
             + " " + fs.fsType
             + " " + fs.options
             + " 0"
-            + " " + (if fs.fsType == "none" || fs.device == "none" || fs.fsType == "btrfs" || fs.fsType == "tmpfs" || fs.noCheck then "0" else
+            + " " + (if skipCheck fs then "0" else
                      if fs.mountPoint == "/" then "1" else "2")
             + "\n"
         )}