I’m playing with making a NixOS package out of an existing piece of software (see for some context: https://github.com/NixOS/nixpkgs/issues/55364 ). This piece of software comes as a single folder which holds all sorts of data, binaries, initial config, working config, temporary files, and so on. For one, this just won’t work because nix store is readonly. Then, it does not feel right anyway.
What’s the best idea for laying out the folders?
My guess was like this:
- Binary files sit where the package is deployed, in
- Static config files which stitch together pieces of the app and do not change at runtime (from the UI of the app) should be emitted based on the
configuration.nixand stored under
- Dynamic config files which change when users interact with the app UI would go under
/var/lib(by “users” I do not mean Linux users, and the change of state is global for the app).
- Temporary files go under
- Logs go under
Is this wrong/right/excessive/not-handy in any sense? How would you lay this out?