Mount options for /nix/store

I am using ext4 to mount the system in one partition as

  fileSystems."/" = {
    device = "/dev/disk/by-uuid/<uuid>";
    label = "root_partition";
    fsType = "ext4";

I see that /nix/store is mounted with option relatime.

I see recommendations to mount /nix or /nix/store with noatime option.

System is in M2 device. What is your recommendation to optimal mount /nix or nix/store, or not change anything? I do not want another partition for /nix/store.

If anyone interested:

  boot.postBootCommands = ''
    mount -o remount,ro,bind,noatime,discard /nix/store

Did the job. Please let me know if anything is wrong with this approach.

1 Like

I just mount the whole root partition with noatime, never caused me any issues.

1 Like