nixos/unifi: fix mongodb to a stable version

Otherwise unifi might break on a next big update
just like https://github.com/NixOS/nixpkgs/pull/207382#issuecomment-1371303817

Also this requires an update of the unifi package. With the LTS
version, newer mongodb versions aren't supported. The current supported
version of unifi 7 is mongodb 3.6 acording to
https://community.ui.com/releases/UniFi-Network-Application-7-0-20/3e4a4099-c063-42f6-8e21-5fb2c99fcea9 which isn't even supplied by nixpkgs anymore.

mongodb-4_2 isn't officially supported, but works.

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
Florian Brandes 2023-01-04 20:45:47 +01:00
parent df1d5f1dce
commit 45d27d43c4

View file

@ -33,8 +33,8 @@ in
services.unifi.unifiPackage = mkOption {
type = types.package;
default = pkgs.unifiLTS;
defaultText = literalExpression "pkgs.unifiLTS";
default = pkgs.unifi5;
defaultText = literalExpression "pkgs.unifi5";
description = lib.mdDoc ''
The unifi package to use.
'';
@ -42,10 +42,10 @@ in
services.unifi.mongodbPackage = mkOption {
type = types.package;
default = pkgs.mongodb;
default = pkgs.mongodb-4_2;
defaultText = literalExpression "pkgs.mongodb";
description = lib.mdDoc ''
The mongodb package to use.
The mongodb package to use. Please note: unifi7 officially only supports mongodb up until 3.6 but works with 4.2.
'';
};