From 450afb883a612d8ccbcf26925c549a7279d8b545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 20 Sep 2024 14:29:18 +0200 Subject: [PATCH] f2fs: enable compression --- flake.lock | 6 +++--- pkgs/installer/flake-module.nix | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 7d721c678..7140e5bbf 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1725377834, - "narHash": "sha256-tqoAO8oT6zEUDXte98cvA1saU9+1dLJQe3pMKLXv8ps=", + "lastModified": 1726842196, + "narHash": "sha256-u9h03JQUuQJ607xmti9F9Eh6E96kKUAGP+aXWgwm70o=", "owner": "nix-community", "repo": "disko", - "rev": "e55f9a8678adc02024a4877c2a403e3f6daf24fe", + "rev": "51994df8ba24d5db5459ccf17b6494643301ad28", "type": "github" }, "original": { diff --git a/pkgs/installer/flake-module.nix b/pkgs/installer/flake-module.nix index 88373da53..c3afd2940 100644 --- a/pkgs/installer/flake-module.nix +++ b/pkgs/installer/flake-module.nix @@ -49,6 +49,14 @@ let type = "filesystem"; format = "f2fs"; mountpoint = "/"; + extraArgs = [ + "-O" + "extra_attr,inode_checksum,sb_checksum,compression" + ]; + # Recommendations for flash: https://wiki.archlinux.org/title/F2FS#Recommended_mount_options + mountOptions = [ + "compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime,nodiscard" + ]; }; }; }; @@ -69,4 +77,7 @@ in boot.loader.grub.enable = lib.mkDefault true; }; }; + + flake.checks.x86_64-linux.flash-installer-disk-test = + self.nixosConfigurations.flash-installer.config.system.build.installTest; }