about summary refs log tree commit diff
path: root/nixos/modules/services/search/solr.nix
diff options
context:
space:
mode:
authorSarah Brofeldt <sbrofeldt@gmail.com>2019-04-14 11:16:28 +0200
committerGitHub <noreply@github.com>2019-04-14 11:16:28 +0200
commitf839011719f8628791d61fc91354504fa2ba2460 (patch)
tree97d6c01807fb7720c7b765399c65526cf2ba3a2d /nixos/modules/services/search/solr.nix
parent94a8ca219471ea97cd218f9999347c437bbd2c79 (diff)
parentee7565af9d811526b4abd33c900104cb514c25e1 (diff)
downloadnixlib-f839011719f8628791d61fc91354504fa2ba2460.tar
nixlib-f839011719f8628791d61fc91354504fa2ba2460.tar.gz
nixlib-f839011719f8628791d61fc91354504fa2ba2460.tar.bz2
nixlib-f839011719f8628791d61fc91354504fa2ba2460.tar.lz
nixlib-f839011719f8628791d61fc91354504fa2ba2460.tar.xz
nixlib-f839011719f8628791d61fc91354504fa2ba2460.tar.zst
nixlib-f839011719f8628791d61fc91354504fa2ba2460.zip
Merge pull request #58512 from aanderse/solr
solr: init at 8.0.0
Diffstat (limited to 'nixos/modules/services/search/solr.nix')
-rw-r--r--nixos/modules/services/search/solr.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/services/search/solr.nix b/nixos/modules/services/search/solr.nix
index 7200c40e89f7..6659cc8a2d1e 100644
--- a/nixos/modules/services/search/solr.nix
+++ b/nixos/modules/services/search/solr.nix
@@ -13,11 +13,19 @@ in
     services.solr = {
       enable = mkEnableOption "Enables the solr service.";
 
+      # default to the 8.x series not forcing major version upgrade of those on the 7.x series
       package = mkOption {
         type = types.package;
-        default = pkgs.solr;
+        default = if versionAtLeast config.system.stateVersion "19.09"
+          then pkgs.solr_8
+          else pkgs.solr_7
+        ;
         defaultText = "pkgs.solr";
-        description = "Which Solr package to use.";
+        description = ''
+          Which Solr package to use. This defaults to version 7.x if
+          <literal>system.stateVersion &lt; 19.09</literal> and version 8.x
+          otherwise.
+        '';
       };
 
       port = mkOption {