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)
This commit is contained in:
LavaDesu 2021-07-21 22:12:11 +07:00
parent 141298ef6b
commit c9c76d88cb
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -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;
};
}