From 0335fe3a8f469d2d3f659a860bae2bd425840aa4 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Sun, 24 Sep 2023 21:57:17 +0200 Subject: [PATCH] BTRFS mount options --- modules/base.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/base.nix b/modules/base.nix index ace51d5..c6f5955 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -77,7 +77,7 @@ # BTRFS mount options. # - # Compression + # compress= # `nixos-generate-config` does not detect mount options, so we add them here. # https://nixos.wiki/wiki/Btrfs#Compression # @@ -85,8 +85,12 @@ # Under read intensive work-loads, specifying noatime significantly improves performance because no new access time information needs to be written. # https://man.archlinux.org/man/btrfs.5#NOTES_ON_GENERIC_MOUNT_OPTIONS # + # commit= + # The number of seconds between periodic commits to the filesystem. This is 30 seconds by default. Increasing this value reduces the frequency of periodic writes which can reduce wear on the disk. However, this also increases the risk of data loss during the event of an untimely crash. + # https://www.jwillikers.com/btrfs-mount-options + # fileSystems = { - "/".options = [ "compress=zstd" "noatime" ]; + "/".options = [ "compress=zstd" "noatime" "commit=120" ]; }; # BTRFS scrub.