diff --git a/nixos/modules/services/web-apps/mattermost.nix b/nixos/modules/services/web-apps/mattermost.nix index e21164e1e74c..56799a744806 100644 --- a/nixos/modules/services/web-apps/mattermost.nix +++ b/nixos/modules/services/web-apps/mattermost.nix @@ -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 diff --git a/nixos/tests/mattermost/default.nix b/nixos/tests/mattermost/default.nix index 02f5e8ce247b..eb7b814e3983 100644 --- a/nixos/tests/mattermost/default.nix +++ b/nixos/tests/mattermost/default.nix @@ -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 {