4 ms·
`mkdir -p /opt/nix` assumes that there is a convention, and that this is the correct convention - which may not be the case for every situation, and would resul
by kempbellt 6y ago
`mkdir -p /opt/nix` assumes that there is a convention, and that this is the correct convention - which may not be the case for every situation, and would result in creating unnecessary nested directories.
You could make a more sophisticated installation script that attempts to install Nix into conventional locations depending on the specific operating system - or user input - but if you want a simple catch-all, simple installation script `/nix` was a perfect cross-platform installation location, until now.
- catalogia 6y ago> `mkdir -p /opt/nix` assumes that there is a convention A correct assumption on virtually all relevant extant systems... > which may not be the case for every situation In the supposed scenario where the assumption isn't correct, the downside of /opt/nix vs /nix is basically insignificant. What's the overhead of one level of directory nesting, a single extra inode? Big whoop.
- kempbellt 6y agoAnd what is the issue with leaving it as `/nix`, which is (was) accessible on virtually all extant systems? Other than "the root folder is special!"
- catalogia 6y agoNothing was wrong with it, except that it violated convention. As I said: "The big difference between the two is the later conforms to convention while the former doesn't." Violating convention comes with risk. Whether violating convention and assuming that risk is a good idea depends on whether the risk is worth the reward. For Nix, I don't think it was.