summary refs log tree commit diff
path: root/nixos/modules/tasks/filesystems/jfs.nix
blob: fc3905c7dc2010c51b86d666bd73679a3328db6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ 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 ''
      copy_bin_and_libs ${pkgs.jfsutils}/sbin/fsck.jfs
    '';
  };
}