-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
nixos/mautrix-telegram: add documentation for setting arbitrary secrets #103347
Conversation
The change that allows setting the secrets by an environment file had the undocumented side effect of allowing to set any key by the environment file (Related PR: mautrix/telegram#332). This is required to e.g. set `bridge.login_shared_secret`, which was not documented before.
<literal>MAUTRIX_TELEGRAM_APPSERVICE_AS_TOKEN</literal>, | ||
<literal>MAUTRIX_TELEGRAM_APPSERVICE_HS_TOKEN</literal>, | ||
<literal>MAUTRIX_TELEGRAM_TELEGRAM_API_ID</literal>, | ||
<literal>MAUTRIX_TELEGRAM_TELEGRAM_API_HASH</literal> and optionally | ||
<literal>MAUTRIX_TELEGRAM_TELEGRAM_BOT_TOKEN</literal>. | ||
</para> | ||
|
||
<para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blindly relying on how the manual is assembled (i.e. that each description is inside a <para>
right now) is IMHO not a good idea, this can easily cause some weird side-effects as soon as some config of our docbook build changes.
I marked this as stale due to inactivity. → More info |
@CRTified is there an upstream documentation page that explains this behavior to which we can add a link instead of giving an incomplete list of environment variables? |
@doronbehar I was not able to find any documentation in the official docs, probably because this was integrated only due to the PR that I referenced when opening this PR (and that contribution came from @pacien). This would suggest that setting these options with other means is not the intended method of configuration. There's also this "long standing" issue that some configuration options are not accessible from the environment anymore: mautrix/telegram#584 |
I marked this as stale due to inactivity. → More info |
The change that allows setting the secrets by an environment file had the undocumented side effect of allowing to set any key by the environment file (Related PR: mautrix/telegram#332). This is required to e.g. set `bridge.login_shared_secret`, which was not documented before. GitHub: closes NixOS#103347
Motivation for this change
services.mautrix-telegram.environmentFile
can be used to set arbitrary options and is not limitedto the five tokens listed in the original documentation.
In my case, I used it to set
bridge.login_shared_secret
(as a secret, it should not be added to the store), which maps to the environment valueMAUTRIX_TELEGRAM_BRIDGE_LOGIN_SHARED_SECRET
.This PR adds documentation on how to override arbitrary other settings.
This is possible because of the changes here: mautrix/telegram#332
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)@pacien might want to have a look at this, too.