2014-04-14 15:26:48 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2012-03-09 16:17:37 +00:00
|
|
|
|
2014-04-14 15:26:48 +01:00
|
|
|
with lib;
|
2012-03-09 16:17:37 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
inInitrd = any (fs: fs == "vfat") config.boot.initrd.supportedFilesystems;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
config = mkIf (any (fs: fs == "vfat") config.boot.supportedFilesystems) {
|
|
|
|
|
|
|
|
system.fsPackages = [ pkgs.dosfstools ];
|
|
|
|
|
|
|
|
boot.initrd.kernelModules = mkIf inInitrd [ "vfat" "nls_cp437" "nls_iso8859-1" ];
|
|
|
|
|
|
|
|
boot.initrd.extraUtilsCommands = mkIf inInitrd
|
|
|
|
''
|
2015-03-29 00:15:41 +00:00
|
|
|
copy_bin_and_libs ${pkgs.dosfstools}/sbin/dosfsck
|
2012-03-09 16:17:37 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|