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.