Merge pull request #42183 from kisik21/master

nixos/stage-1, nixos/f2fs: added F2FS resizing
This commit is contained in:
Jörg Thalheim
2019-01-17 07:42:32 +00:00
committed by GitHub
3 changed files with 12 additions and 2 deletions
+6
View File
@@ -4,6 +4,7 @@ with lib;
let
inInitrd = any (fs: fs == "f2fs") config.boot.initrd.supportedFilesystems;
fileSystems = filter (x: x.fsType == "f2fs") config.system.build.fileSystems;
in
{
config = mkIf (any (fs: fs == "f2fs") config.boot.supportedFilesystems) {
@@ -14,6 +15,11 @@ in
boot.initrd.extraUtilsCommands = mkIf inInitrd ''
copy_bin_and_libs ${pkgs.f2fs-tools}/sbin/fsck.f2fs
${optionalString (any (fs: fs.autoResize) fileSystems) ''
# We need f2fs-tools' tools to resize filesystems
copy_bin_and_libs ${pkgs.f2fs-tools}/sbin/resize.f2fs
''}
'';
};
}