nixos: Add a filesystem module for JFS.
I'm not using JFS, but this is to mainly make jfsutils available if you have defined a JFS filesystem in your configuration. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
cb2c34f1bb
commit
23160383e3
|
@ -364,6 +364,7 @@
|
||||||
./tasks/filesystems/cifs.nix
|
./tasks/filesystems/cifs.nix
|
||||||
./tasks/filesystems/ext.nix
|
./tasks/filesystems/ext.nix
|
||||||
./tasks/filesystems/f2fs.nix
|
./tasks/filesystems/f2fs.nix
|
||||||
|
./tasks/filesystems/jfs.nix
|
||||||
./tasks/filesystems/nfs.nix
|
./tasks/filesystems/nfs.nix
|
||||||
./tasks/filesystems/reiserfs.nix
|
./tasks/filesystems/reiserfs.nix
|
||||||
./tasks/filesystems/unionfs-fuse.nix
|
./tasks/filesystems/unionfs-fuse.nix
|
||||||
|
|
19
nixos/modules/tasks/filesystems/jfs.nix
Normal file
19
nixos/modules/tasks/filesystems/jfs.nix
Normal file
|
@ -0,0 +1,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 ''
|
||||||
|
cp -v ${pkgs.jfsutils}/sbin/fsck.jfs "$out/bin/"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue