nixos/blade: use tmpfs for /var/log and /var/cache
This commit is contained in:
parent
5924ded23d
commit
5b63d1555a
1 changed files with 6 additions and 0 deletions
|
@ -48,6 +48,10 @@ in {
|
||||||
device = device;
|
device = device;
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
tmpfs = size: {
|
||||||
|
device = "none";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=${size}" "mode=755" ];
|
||||||
in {
|
in {
|
||||||
"/" = zfs "tank/local/root";
|
"/" = zfs "tank/local/root";
|
||||||
"/tmp" = zfs "tank/local/tmp";
|
"/tmp" = zfs "tank/local/tmp";
|
||||||
|
@ -58,6 +62,8 @@ in {
|
||||||
device = "/dev/disk/by-label/boot";
|
device = "/dev/disk/by-label/boot";
|
||||||
fsType = "ext4";
|
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) {
|
} // (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" = {
|
"/var/lib/ceph" = {
|
||||||
device = "/dev/disk/by-label/var-lib-ceph";
|
device = "/dev/disk/by-label/var-lib-ceph";
|
||||||
|
|
Loading…
Reference in a new issue