Adding TMPFS To NixOS

- 1 min read

Summary

During the install process for NixOS it will not typically (at least in my experience) add a tmpfs entry to /tmp, as a result I need to add this post install. Simply add the following to your nix config:

fileSystems."/tmp" = { fsType = "tmpfs"; };

For some reason the NixOS search site does not display any information about the specialFSTypes that you can specify in fileSystems.<name>.fsType so I had to find that myself. Thankfully as usual all modules have a “Declared in” section where you can look through the code and thats where I found this specialFSTypes.

Sources