at 16.09-beta 444 B view raw
1{ config, pkgs, lib, ... }: 2 3with lib; 4 5let 6 inInitrd = any (fs: fs == "f2fs") config.boot.initrd.supportedFilesystems; 7in 8{ 9 config = mkIf (any (fs: fs == "f2fs") config.boot.supportedFilesystems) { 10 11 system.fsPackages = [ pkgs.f2fs-tools ]; 12 13 boot.initrd.availableKernelModules = mkIf inInitrd [ "f2fs" ]; 14 15 boot.initrd.extraUtilsCommands = mkIf inInitrd '' 16 copy_bin_and_libs ${pkgs.f2fs-tools}/sbin/fsck.f2fs 17 ''; 18 }; 19}