2014-04-14 16:26:48 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
2012-03-09 15:37:58 +01:00
|
|
|
|
2014-04-14 16:26:48 +02:00
|
|
|
with lib;
|
2012-03-09 15:37:58 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|