nixpkgs/nixos/modules/tasks/filesystems/ntfs.nix
Cray Elliott 479f5f4ae6 fix rebuild when using ntfs partitions
needed to define inInitrd, used vfat.nix as a template
2015-04-19 15:17:23 -07:00

23 lines
449 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
inInitrd = any (fs: fs == "ntfs") config.boot.initrd.supportedFilesystems;
in
{
config = mkIf (any (fs: fs == "ntfs" || fs == "ntfs-3g") config.boot.supportedFilesystems) {
system.fsPackages = [ pkgs.ntfs3g ];
boot.initrd.kernelModules = mkIf inInitrd [ "jfs" ];
boot.initrd.extraUtilsCommands = mkIf inInitrd ''
copy_bin_and_libs ${pkgs.jfsutils}/sbin/fsck.jfs
'';
};
}