summary refs log tree commit diff
path: root/modules/tasks/filesystems/reiserfs.nix
blob: f8c6a70000409a3d30f99f8b6a8cb0c2a637896d (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, 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
      '';

  };
}