-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Read-only configuration file #2071
Comments
by the way, Im not sure that write in an user configuration file will be a good practice. Why do you do? To ease users to modify devices? |
|
Ok Ive check with dev branch and the situation improves:
|
latest dev will now not write to |
Nice! It's working well. The main concern is not solved yet but i guess I can close the issue and come back later. Thanks so much! |
Hey @juaningan would you mind sharing the expression you created for packaging zigbee2mqtt ? |
Hi, i generate expressions with node2nix, and then overrides some stuff: https://gist.github.com/juaningan/d96764c6ea4f3205c39b1c92d3ca8091 You have to import z2m.nix in your configuration.nix. Try it and share. Because I'm not sure if do some other workaround. |
@juaningan thanks for sharing! Without the override i got the error i reported svanderburg/node2nix#171 . Now i can finally continue with the deployment, |
Updated link for the external configuration documentation since the old link died: https://www.zigbee2mqtt.io/guide/configuration/devices-groups.html#extract-config-to-separate-files This is a super useful feature for storing configuration.yaml in a ConfigMap on Kubernetes! Example ConfigMap:
Note that you should probably store your configuration in a Secret instead, if you're using MQTT authentication or setting a network key. |
Hi, I'm trying succesfully to build zigbee2mqtt for Nix ecosystem (Nixpkgs, NixOS...). Goes well but Im have a problem with configuration file.
To implement configuration options as Nix Modules the configuration file has to be read-only (stored in /nix/store and linked from ZIGBEE2MQTT_DATA dir). Problem: when app detects new device try to write in configuration.yaml and fails.
I could workaround with two files: configuration.yaml (read-only) and devices.yaml (read-write) with some trade-offs but also fails right now.
Can you put me on track of some solution? I can implement it and PR but don't know which way do you prefer.
The text was updated successfully, but these errors were encountered: