mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #5499 from wizeman/u/zfs-dont-fsck
nixos: When generating /etc/fstab, ZFS and NFS filesystems shouldn't be checked
This commit is contained in:
commit
8780caadd4
@ -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"
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user