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
- https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/tasks/filesystems.nix#L25
- https://search.nixos.org/options?channel=24.05&show=fileSystems.%3Cname%3E.fsType&from=0&size=50&sort=relevance&type=packages&query=fileSystems.%3Cname%3E