about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/tasks/filesystems/reiserfs.nix
blob: 7b017a83db84883994402cf04da0167e0c8c6a0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ 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
      '';

  };
}