From c9c76d88cbccc85a69f82d79c0e18bb10d541c1a Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Wed, 21 Jul 2021 22:12:11 +0700 Subject: [PATCH] fstab changes set defaults for btrfs mounts set relatime for normal mounts set noatime for some btrfs mounts (like /nix which i _never_ need to know when something was accessed) --- modules/system/filesystem-winter.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/system/filesystem-winter.nix b/modules/system/filesystem-winter.nix index 4a365eb..1dc981b 100644 --- a/modules/system/filesystem-winter.nix +++ b/modules/system/filesystem-winter.nix @@ -3,9 +3,10 @@ let mkMount = uuid: type: { device = "/dev/disk/by-uuid/${uuid}"; fsType = type; + options = [ "defaults" "relatime" ]; }; - mkBtrfsMount = subvolid: mkMount "8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d" "btrfs" // { - options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=${builtins.toString subvolid}" ]; + mkBtrfsMount = subvolid: atime: mkMount "8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d" "btrfs" // { + options = [ "autodefrag" "compress=zstd:3" "defaults" "nossd" "nossd_spread" "subvolid=${builtins.toString subvolid}" (if atime then "relatime" else "noatime")]; }; in { @@ -18,11 +19,11 @@ in "/boot" = mkMount "E8E8-E570" "vfat"; "/mnt/hdd" = mkMount "d5e3cfe5-c73a-4695-b81b-fc0215d4cefe" "ext4"; - "/mnt/butter" = mkBtrfsMount 5; - "/nix" = mkBtrfsMount 258; - "/home" = mkBtrfsMount 260; - "/home/.snapshots" = mkBtrfsMount 319; - "/root" = mkBtrfsMount 261; - "/var" = mkBtrfsMount 259; + "/mnt/butter" = mkBtrfsMount 5 true; + "/nix" = mkBtrfsMount 258 false; + "/home" = mkBtrfsMount 260 true; + "/home/.snapshots" = mkBtrfsMount 319 false; + "/root" = mkBtrfsMount 261 false; + "/var" = mkBtrfsMount 259 false; }; }