nixos/blade: use tmpfs for /var/log and /var/cache

This commit is contained in:
Luke Granger-Brown 2021-03-31 21:20:08 +00:00
parent 5924ded23d
commit 5b63d1555a

View file

@ -48,6 +48,10 @@ in {
device = device;
fsType = "zfs";
};
tmpfs = size: {
device = "none";
fsType = "tmpfs";
options = [ "defaults" "size=${size}" "mode=755" ];
in {
"/" = zfs "tank/local/root";
"/tmp" = zfs "tank/local/tmp";
@ -58,6 +62,8 @@ in {
device = "/dev/disk/by-label/boot";
fsType = "ext4";
};
"/var/log" = tmpfs "2G";
"/var/cache" = tmpfs "16G";
} // (lib.optionalAttrs (config.services.ceph.osd.enable || config.services.ceph.mgr.enable || config.services.ceph.mon.enable || config.services.ceph.mgr.enable) {
"/var/lib/ceph" = {
device = "/dev/disk/by-label/var-lib-ceph";