about summary refs log tree commit diff
path: root/nixos/modules/tasks/filesystems
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2019-01-17 07:42:32 +0000
committerGitHub <noreply@github.com>2019-01-17 07:42:32 +0000
commita6b97bd1bbce75b0a6a2baa83126b603696e500e (patch)
tree4a1dfed1cfa17287aa8c69d1d55556de5983519c /nixos/modules/tasks/filesystems
parentc052da08dcb3235ee0e3f7c353fc9a664b12dbef (diff)
parent62d21f251194ba93541239adc22afd0fb4f38f71 (diff)
downloadnixlib-a6b97bd1bbce75b0a6a2baa83126b603696e500e.tar
nixlib-a6b97bd1bbce75b0a6a2baa83126b603696e500e.tar.gz
nixlib-a6b97bd1bbce75b0a6a2baa83126b603696e500e.tar.bz2
nixlib-a6b97bd1bbce75b0a6a2baa83126b603696e500e.tar.lz
nixlib-a6b97bd1bbce75b0a6a2baa83126b603696e500e.tar.xz
nixlib-a6b97bd1bbce75b0a6a2baa83126b603696e500e.tar.zst
nixlib-a6b97bd1bbce75b0a6a2baa83126b603696e500e.zip
Merge pull request #42183 from kisik21/master
nixos/stage-1, nixos/f2fs: added F2FS resizing
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r--nixos/modules/tasks/filesystems/f2fs.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/tasks/filesystems/f2fs.nix b/nixos/modules/tasks/filesystems/f2fs.nix
index d103ff1a57b5..a305235979a2 100644
--- a/nixos/modules/tasks/filesystems/f2fs.nix
+++ b/nixos/modules/tasks/filesystems/f2fs.nix
@@ -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
+      ''}
+
     '';
   };
 }