about summary refs log tree commit diff
path: root/nixos/modules/tasks/filesystems
diff options
context:
space:
mode:
authorZane van Iperen <zane@zanevaniperen.com>2021-07-01 00:11:35 +1000
committerZane van Iperen <zane@zanevaniperen.com>2021-08-24 03:31:41 +1000
commita049d842292fc891a13a80e8725df31657308195 (patch)
treed67a1050c48a1a81e5bb6dc5facce83497d031e8 /nixos/modules/tasks/filesystems
parent002e0737ff526e15e30ce6be41fc0037d8e88ab7 (diff)
downloadnixlib-a049d842292fc891a13a80e8725df31657308195.tar
nixlib-a049d842292fc891a13a80e8725df31657308195.tar.gz
nixlib-a049d842292fc891a13a80e8725df31657308195.tar.bz2
nixlib-a049d842292fc891a13a80e8725df31657308195.tar.lz
nixlib-a049d842292fc891a13a80e8725df31657308195.tar.xz
nixlib-a049d842292fc891a13a80e8725df31657308195.tar.zst
nixlib-a049d842292fc891a13a80e8725df31657308195.zip
nixos/filesystems/exfat: use "exfatprogs" instead of "exfat" if kernel > 5.7
5.7+ comes with a native exfat implementation, exfatprogs should be used instead.

The exfat package puts a "mount.exfat" binary in the path, which causes
mount to prefer the FUSE version to the non-fuse one. There's no way to
disable the binary, so switch to exfatprogs.
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r--nixos/modules/tasks/filesystems/exfat.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/tasks/filesystems/exfat.nix b/nixos/modules/tasks/filesystems/exfat.nix
index 1527f993fdd4..540b9b91c3ec 100644
--- a/nixos/modules/tasks/filesystems/exfat.nix
+++ b/nixos/modules/tasks/filesystems/exfat.nix
@@ -4,8 +4,10 @@ with lib;
 
 {
   config = mkIf (any (fs: fs == "exfat") config.boot.supportedFilesystems) {
-
-    system.fsPackages = [ pkgs.exfat ];
-
+    system.fsPackages = if config.boot.kernelPackages.kernelOlder "5.7" then [
+      pkgs.exfat # FUSE
+    ] else [
+      pkgs.exfatprogs # non-FUSE
+    ];
   };
 }