reiserfs now have separate modules that are conditional on boot.supportedFilesystems and boot.initrd.supportedFilesystems. By default, these include the filesystems specified in the fsType attribute in fileSystems. Ext2/3/4 support is currently unconditional. Also unbreak the installer test (http://hydra.nixos.org/build/2272302). svn path=/nixos/trunk/; revision=32954wip/yesman
parent
8708578181
commit
03ebb883d1
@ -0,0 +1,38 @@ |
||||
{ config, pkgs, ... }: |
||||
|
||||
with pkgs.lib; |
||||
|
||||
let |
||||
|
||||
inInitrd = any (fs: fs == "btrfs") config.boot.initrd.supportedFilesystems; |
||||
|
||||
in |
||||
|
||||
{ |
||||
config = mkIf (any (fs: fs == "btrfs") config.boot.supportedFilesystems) { |
||||
|
||||
system.fsPackages = [ pkgs.btrfsProgs ]; |
||||
|
||||
boot.initrd.kernelModules = mkIf inInitrd [ "btrfs" "crc32c" ]; |
||||
|
||||
boot.initrd.extraUtilsCommands = mkIf inInitrd |
||||
'' |
||||
cp -v ${pkgs.btrfsProgs}/bin/btrfsck $out/bin |
||||
cp -v ${pkgs.btrfsProgs}/bin/btrfs $out/bin |
||||
ln -sv btrfsck $out/bin/fsck.btrfs |
||||
''; |
||||
|
||||
boot.initrd.postDeviceCommands = mkIf inInitrd |
||||
'' |
||||
btrfs device scan |
||||
''; |
||||
|
||||
# !!! This is broken. There should be a udev rule to do this when |
||||
# new devices are discovered. |
||||
jobs.udev.postStart = |
||||
'' |
||||
${pkgs.btrfsProgs}/bin/btrfs device scan |
||||
''; |
||||
|
||||
}; |
||||
} |
@ -0,0 +1,22 @@ |
||||
{ config, pkgs, ... }: |
||||
|
||||
{ |
||||
config = { |
||||
|
||||
system.fsPackages = [ pkgs.e2fsprogs ]; |
||||
|
||||
boot.initrd.kernelModules = [ "ext2" "ext3" "ext4" ]; |
||||
|
||||
boot.initrd.extraUtilsCommands = |
||||
'' |
||||
# Copy e2fsck and friends. |
||||
cp -v ${pkgs.e2fsprogs}/sbin/e2fsck $out/bin |
||||
cp -v ${pkgs.e2fsprogs}/sbin/tune2fs $out/bin |
||||
ln -sv e2fsck $out/bin/fsck.ext2 |
||||
ln -sv e2fsck $out/bin/fsck.ext3 |
||||
ln -sv e2fsck $out/bin/fsck.ext4 |
||||
cp -pdv ${pkgs.e2fsprogs}/lib/lib*.so.* $out/lib |
||||
''; |
||||
|
||||
}; |
||||
} |
@ -0,0 +1,25 @@ |
||||
{ config, pkgs, ... }: |
||||
|
||||
with pkgs.lib; |
||||
|
||||
let |
||||
|
||||
inInitrd = any (fs: fs == "nfs") config.boot.initrd.supportedFilesystems; |
||||
|
||||
in |
||||
|
||||
{ |
||||
config = { |
||||
|
||||
system.fsPackages = [ pkgs.nfsUtils ]; |
||||
|
||||
boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ]; |
||||
|
||||
boot.initrd.extraUtilsCommands = mkIf inInitrd |
||||
'' |
||||
# !!! Uh, why don't we just install mount.nfs? |
||||
cp -v ${pkgs.klibc}/lib/klibc/bin.static/nfsmount $out/bin |
||||
''; |
||||
|
||||
}; |
||||
} |
@ -0,0 +1,25 @@ |
||||
{ config, pkgs, ... }: |
||||
|
||||
with pkgs.lib; |
||||
|
||||
let |
||||
|
||||
inInitrd = any (fs: fs == "reiserfs") config.boot.initrd.supportedFilesystems; |
||||
|
||||
in |
||||
|
||||
{ |
||||
config = mkIf (any (fs: fs == "reiserfs") config.boot.supportedFilesystems) { |
||||
|
||||
system.fsPackages = [ pkgs.reiserfsprogs ]; |
||||
|
||||
boot.initrd.kernelModules = mkIf inInitrd [ "reiserfs" ]; |
||||
|
||||
boot.initrd.extraUtilsCommands = mkIf inInitrd |
||||
'' |
||||
cp -v ${pkgs.reiserfsprogs}/sbin/reiserfsck $out/bin |
||||
ln -sv reiserfsck $out/bin/fsck.reiserfs |
||||
''; |
||||
|
||||
}; |
||||
} |
Loading…
Reference in new issue