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.
20 lines
460 B
Nix
20 lines
460 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
inInitrd = any (fs: fs == "jfs") config.boot.initrd.supportedFilesystems;
|
|
in
|
|
{
|
|
config = mkIf (any (fs: fs == "jfs") config.boot.supportedFilesystems) {
|
|
|
|
system.fsPackages = [ pkgs.jfsutils ];
|
|
|
|
boot.initrd.kernelModules = mkIf inInitrd [ "jfs" ];
|
|
|
|
boot.initrd.extraUtilsCommands = mkIf (inInitrd && !boot.initrd.systemd.enable) ''
|
|
copy_bin_and_libs ${pkgs.jfsutils}/sbin/fsck.jfs
|
|
'';
|
|
};
|
|
}
|