Commit Graph

3 Commits

Author SHA1 Message Date
stuebinm
c29ca6704d mattermost: add environmentFile option to allow declarative secrets
This adds an option `services.mattermost.environmentFile`, intended to be
useful especially when `services.mattermost.mutableConfig` is set to `false`.
Since all mattermost configuration options can also be set by environment
variables, this allows managing secret configuration values in a declarative
manner without placing them in the nix store.
2023-03-27 20:46:01 +02:00
Morgan Jones
73fc80e0d7 nixos/mattermost: Support declarative Mattermost plugins 2021-12-31 23:49:00 -05:00
Morgan Jones
174b340406 nixos/mattermost: add preferNixConfig option and tests
One use case for Mattermost configuration is doing a "mostly
mutable" configuration where NixOS module options take priority
over Mattermost's config JSON.

Add a preferNixConfig option that prefers configured Nix options
over what's configured in Mattermost config if mutableConfig is set.

Remove the reliance on readFile (it's flake incompatible) and use
jq instead.

Merge Mattermost configs together on Mattermost startup, depending
on configured module options.

Write tests for mutable, mostly mutable, and immutable configurations.
2021-12-31 23:49:00 -05:00