mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
26 lines
514 B
Nix
26 lines
514 B
Nix
{ 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
|
|
'';
|
|
|
|
};
|
|
}
|