Open
Description
Currently moonfire-nvr
has a mix of a config file and then more config in the DB.
It would be great if all config could optionally be done declaratively in a text file.
This make it easier to:
- check the config into version control (e.g. git), and diff it
- use it in declarative systems such as NixOS Linux
- have users post their full config in guides and issues, instead of having to provide screenshots
- increase simplicity and scriptability: Directly invoke
moonfire-nvr run --config myconfig.toml
with a single invocation, no separateinit
orconfig
calls needed; they'd be done automatically; no need to navigatecurses
UIs (I appreciate that it's a cool feature that's nice for some groups of users, but many others might find the "just invoke 1 binary on 1 config file" approach even easier)
I understand that you also want to provide the feature to change settings, cameras, etc. via an API. For that, a DB is of course more suitable than a read-only configuration text file.
For that I propose to control the behaviour with some options:
- One to say "use this config file to initialise the DB; afterwards, config values in the DB persist and get used after restart".
- One to say "just use the config files; further configs done at run-time apply in-memory but get wiped on next restart".
- One to say "just use the config files, read-only; reject any config change via the API or similar".
Metadata
Assignees
Labels
No labels