nixos/mattermost: default preferNixConfig to true

Now that we are disabling telemetry by default, we should attempt to
override it and other options in existing mutable configs,
if the user had a mutable config and advances their system.stateVersion.
This commit is contained in:
Morgan Jones 2025-01-25 17:43:18 -08:00 committed by Valentin Gagarin
parent fc3f7c17e2
commit 672f423d0c
2 changed files with 5 additions and 2 deletions

View File

@ -462,7 +462,10 @@ in
preferNixConfig = mkOption {
type = types.bool;
default = false;
default = versionAtLeast config.system.stateVersion "25.05";
defaultText = ''
versionAtLeast config.system.stateVersion "25.05";
'';
description = ''
If both mutableConfig and this option are set, the Nix configuration
will take precedence over any settings configured in the server

View File

@ -94,6 +94,7 @@ import ../make-test-python.nix (
makeMattermost
{
mutableConfig = true;
preferNixConfig = false;
settings.SupportSettings.HelpLink = "https://search.nixos.org";
}
{
@ -105,7 +106,6 @@ import ../make-test-python.nix (
};
postgresMostlyMutable = makeMattermost {
mutableConfig = true;
preferNixConfig = true;
plugins = with pkgs; [
# Build the demo plugin.
(mattermost.buildPlugin {