nixos/ntfs: install userspace utils for the new NTFS (NTFSPLUS) driver (#538047)

This commit is contained in:
Masum Reza
2026-07-11 06:57:25 +00:00
committed by GitHub
2 changed files with 19 additions and 8 deletions
@@ -121,6 +121,8 @@
- `security.polkit.settings` added for RFC42 style configuration of the polkitd daemon.
- `boot.supportedFilesystems.ntfs` installs `ntfsprogs-plus` instead of `ntfs3g` on kernel version 7.1 and later, unless `boot.supportedFilesystems.ntfs-3g` is explicitly enabled.
- The `programs.fuse` module, which provides the `fusermount3` executable and the `/etc/fuse.conf` config file, is now opt-in. The obligation to enable it has been shifted to its various consumers (e.g. gvfs, flatpak, appimage, sshfs). This can break fuse consumers at runtime, that don't explicitly declare that dependency with a module, e.g the mounting functionality in various backup tools (borg, restic, rclone, ...).
- `services.plausible` can now again seed an initial admin user declaratively via [`services.plausible.adminUser.email`](#opt-services.plausible.adminUser.email).
+17 -8
View File
@@ -4,15 +4,24 @@
pkgs,
...
}:
with lib;
let
ntfsEnabled = config.boot.supportedFilesystems.ntfs or false;
ntfs3gEnabled = config.boot.supportedFilesystems.ntfs-3g or false;
ntfsPlusSupported = config.boot.kernelPackages.kernelAtLeast "7.1";
initrdSupport = config.boot.initrd.supportedFilesystems.ntfs or false;
in
{
config =
mkIf (config.boot.supportedFilesystems.ntfs or config.boot.supportedFilesystems.ntfs-3g or false)
{
config = lib.mkMerge [
(lib.mkIf (ntfsEnabled && ntfsPlusSupported && !ntfs3gEnabled) {
system.fsPackages = [ pkgs.ntfsprogs-plus ];
system.fsPackages = [ pkgs.ntfs3g ];
boot.initrd.availableKernelModules = lib.optionals initrdSupport [ "ntfs" ];
})
};
(lib.mkIf (ntfs3gEnabled || (ntfsEnabled && !ntfsPlusSupported)) {
system.fsPackages = [ pkgs.ntfs3g ];
boot.initrd.availableKernelModules = lib.optionals initrdSupport [ "ntfs3" ];
})
];
}