Update partitioning & allow persistence
- Our previous / tmpfs was *way* too small for nix builds, which happen in /tmp
- For now, I've decided to increase the size
- In the future I may persist /tmp on /large/persist
- Device labels should be capitals for compatability: although my system
supports it, not all do
- Add noatime to /nix to reduce surplus writes
diff --git a/modules/filesystems.nix b/modules/filesystems.nix
index 73ef7e1..6f071bb 100644
--- a/modules/filesystems.nix
+++ b/modules/filesystems.nix
@@ -8,20 +8,26 @@
hideMounts = true;
};
+ environment.persistence."/nix/cache" = {
+ hideMounts = true;
+ };
+
fileSystems."/" = {
device = "none";
fsType = "tmpfs";
- options = ["defaults" "size=4G" "mode=755"];
+ options = ["defaults" "size=20G" "mode=755"];
};
fileSystems."/boot" = {
- device = "/dev/disk/by-label/boot";
+ device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
fileSystems."/nix" = {
device = "/dev/mapper/nix";
fsType = "ext4";
+ neededForBoot = true;
+ options = ["noatime"];
};
fileSystems."/large" = {
@@ -32,5 +38,7 @@
swapDevices = [
{device = "/dev/mapper/swap";}
];
+
+ boot.initrd.availableKernelModules = ["nvme"];
};
}