I need to create sqlite database, but as I’m trying to achieve full automation, doing it manually from the CLI is not an option for me, so I’m wondering, if there’s an option to define DB creation inside .nix file, which would include DB name and path
Sure can!
I would use the runCommand
builder and just create the database which would be an entry in the nix store.
2 Likes
If you go the runCommand
route, the database will not be writable, though. This may not be an issue for you, but if it is you can take inspiration from the postgresql module which does something similar with its ensureDatabases
option.
2 Likes