Filesystem choices

So I am thinking of migrating my main workstation to NixOS from Fedora. The machine has a 256GB ssd and a 1TB HDD and a 4TB external HDD.

My thoughts as such, and really looking to get an idea of what other user prefer for their filesystem choices.

2 or 3 mount points / /var /home. Not sure about /var let me come back to that.

xfs or ext4 on the ssd and it will hold /

zfs on the hdd and it will hold /home

The hdd probably be ext4, it is mostly for backups and “cold storage”. This machine is a home server/workstation. All devices backup to it, runs emby server and holds out media library. Things like that.

So my questions:

  1. In my usual world view /var is something I would typically put to the hdd not the ssd, Depends on the usage but seeing how /var holds the /store… From what I have seen NixOS users /var a bit differently and not sure if it fits the just the traditional server log view.

  2. I am thinking of repartitioning the 4TB external to a 1TB and 3TB set. The 1TB set would be zfs and basically act as a mirror for the storage pool with the internal 1TB and the 3TB would be ext4.

In short I am trying to find a happy balance between performance and data reliability.

Some other specs if it matters. The computer is a Lenovo TS120 Thinkserver. It has a 4th gen i3 and 20GB of ram. However I am about to pull 4GB of that ram for my sons gaming computer so lets call it 16GB of ram and thinking of operating with no swap. Or maybe 8gb of swap on the ssd and swappiness set very low (like 10). The 4TB external is USB 3. I also have a USB 2 2TB that I am retiring. But I can use it to mirror the 4tb as it only has 1.4 tb on it anyway for the sake or reparitioning without data loss.

As I work in a mostly solaris shop and also do some freebsd stuff I have a certain trust in zfs. I am not calling it the end all be all of filesystems, but I prefer its snapshot features.


1 Like

The nix store is mounted in /nix/store, so you should be able to treat /var as on other distros.

1 Like

I realized I was looking at /nix/var instead of /var. Sorry so much to absorb.

I guess back to the original question on what do most prefer for filesystem choices? I am second guessing trying to mirror with a disk over usb3 as that might make writes a very slow operation.


Mirroring writes over USB3 is asking for trouble… Better to set up rdiffbackup or similar.

Consider turning on compression for /nix, it could increase I/O depending on your CPU and it also gives you more diskspace.

/var is still variable data, so a non-COW filesystem is probably a better fit - ext4/xfs should do fine. The author of bcachefs is really impressed with the xfs codebase.

Also, consider bcachefs, it looks really cool but not as full-featured as zfs.

Yeah I elected not to stripe across usb3. So what I have setup is:

/ as xfs on the ssd (256 mb)

/home as zfs on the 1tb hdd

a 4tb external that was already formatted as ext4 to begin with.

My Plan is Probably to buy two 2tb drives in the future to use as a mirrored pool in the box. Have not decided if or when on that.


If you do things like compiling in your homedir, you’ll be sorry it’s on a HDD. Consider adding ARC cache: Get Maxed Out Storage Performance with ZFS Caching - iXsystems, Inc. - Enterprise Storage & Servers