mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
160fb93fdc
This includes disabling some features in the initrd by default, this is only done when the new initrd is used. Namely, ext and bcache are disabled by default. bcache gets an own enable option while ext is detected like any other filesystem.
25 lines
556 B
Nix
25 lines
556 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with 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 && !config.boot.initrd.systemd.enable)
|
|
''
|
|
copy_bin_and_libs ${pkgs.reiserfsprogs}/sbin/reiserfsck
|
|
ln -s reiserfsck $out/bin/fsck.reiserfs
|
|
'';
|
|
|
|
};
|
|
}
|