[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Simple text-based config #328

Open
nh2 opened this issue Oct 30, 2024 · 0 comments
Open

Feature: Simple text-based config #328

nh2 opened this issue Oct 30, 2024 · 0 comments

Comments

@nh2
Copy link
nh2 commented Oct 30, 2024

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
    • see e.g. this for a declarative frigate config, it would be great to be able to do this with Moonfire as well
  • 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 separate init or config calls needed; they'd be done automatically; no need to navigate curses 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".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant