diff options
author | Victor Shlein <kisik21@users.noreply.github.com> | 2018-06-19 13:53:34 +0300 |
---|---|---|
committer | Victor Shlein <kisik21@users.noreply.github.com> | 2018-06-19 13:53:34 +0300 |
commit | 577483738c602581b3688a136dd9dea988e4ecd7 (patch) | |
tree | 9bf5c2a24b4d3eca6028ac13b19b7fbd8082b17b /nixos | |
parent | 0b9b7be5bfb85fc549146a36130cdd874a2381af (diff) | |
download | nixpkgs-577483738c602581b3688a136dd9dea988e4ecd7.tar nixpkgs-577483738c602581b3688a136dd9dea988e4ecd7.tar.gz nixpkgs-577483738c602581b3688a136dd9dea988e4ecd7.tar.bz2 nixpkgs-577483738c602581b3688a136dd9dea988e4ecd7.tar.lz nixpkgs-577483738c602581b3688a136dd9dea988e4ecd7.tar.xz nixpkgs-577483738c602581b3688a136dd9dea988e4ecd7.tar.zst nixpkgs-577483738c602581b3688a136dd9dea988e4ecd7.zip |
nixos/stage-1: implemented separate check for f2fs filesystems in need of resizing
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 21f2fdb4158..b1fddf8dd7f 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -126,8 +126,11 @@ let ${optionalString (any (fs: fs.autoResize) fileSystems) '' # We need mke2fs in the initrd. copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/resize2fs - # Copy also f2fs-tools' fsck and resize - # TODO: separate these in case no f2fs fs are present + ''} + + # Copy f2fs-tools' fsck and resize if needed + ${optionalString (any (fs: fs.autoResize) (filter (x: x.fsType == "f2fs") fileSystems)) '' + # We need f2fs-tools' tools to resize filesystems copy_bin_and_libs ${pkgs.f2fs-tools}/sbin/fsck.f2fs copy_bin_and_libs ${pkgs.f2fs-tools}/sbin/resize.f2fs ''} |