From 191131077b330289deb5057800a824646a741909 Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Sat, 23 Sep 2023 13:40:15 +0200 Subject: [PATCH] unifi7: 7.4.156 -> 7.5.176 --- nixos/modules/services/networking/unifi.nix | 8 ++++++-- pkgs/servers/unifi/default.nix | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/networking/unifi.nix b/nixos/modules/services/networking/unifi.nix index 3579d67aa54b..37a739f41d48 100644 --- a/nixos/modules/services/networking/unifi.nix +++ b/nixos/modules/services/networking/unifi.nix @@ -5,6 +5,10 @@ let stateDir = "/var/lib/unifi"; cmd = '' @${cfg.jrePackage}/bin/java java \ + ${optionalString (lib.versionAtLeast (lib.getVersion cfg.jrePackage) "16") + "--add-opens java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED " + + "--add-opens java.base/sun.security.util=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED " + + "--add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED"} \ ${optionalString (cfg.initialJavaHeapSize != null) "-Xms${(toString cfg.initialJavaHeapSize)}m"} \ ${optionalString (cfg.maximumJavaHeapSize != null) "-Xmx${(toString cfg.maximumJavaHeapSize)}m"} \ -jar ${stateDir}/lib/ace.jar @@ -24,8 +28,8 @@ in services.unifi.jrePackage = mkOption { type = types.package; - default = if (lib.versionAtLeast (lib.getVersion cfg.unifiPackage) "7.3") then pkgs.jdk11 else pkgs.jre8; - defaultText = literalExpression ''if (lib.versionAtLeast (lib.getVersion cfg.unifiPackage) "7.3" then pkgs.jdk11 else pkgs.jre8''; + default = if (lib.versionAtLeast (lib.getVersion cfg.unifiPackage) "7.5") then pkgs.jdk17_headless else if (lib.versionAtLeast (lib.getVersion cfg.unifiPackage) "7.3") then pkgs.jdk11 else pkgs.jre8; + defaultText = literalExpression ''if (lib.versionAtLeast (lib.getVersion cfg.unifiPackage) "7.5") then pkgs.jdk17_headless else if (lib.versionAtLeast (lib.getVersion cfg.unifiPackage) "7.3" then pkgs.jdk11 else pkgs.jre8''; description = lib.mdDoc '' The JRE package to use. Check the release notes to ensure it is supported. ''; diff --git a/pkgs/servers/unifi/default.nix b/pkgs/servers/unifi/default.nix index b403404747b1..e705d8bc394c 100644 --- a/pkgs/servers/unifi/default.nix +++ b/pkgs/servers/unifi/default.nix @@ -66,7 +66,8 @@ in rec { }; unifi7 = generic { - version = "7.4.156"; - sha256 = "sha256-UJjzSC2qKi2ABwH5p0s/5fXfB3NVfYBb3wBfE/8NlK4="; + version = "7.5.176"; + suffix = "-1136930355"; + sha256 = "sha256-prsFq09zYrB74p/MGKjwvZftw78k9wbIva5xFdk+Ztw="; }; }