summary refs log tree commit diff
path: root/nixos/modules/services/search/solr.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/search/solr.nix')
-rw-r--r--nixos/modules/services/search/solr.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/nixos/modules/services/search/solr.nix b/nixos/modules/services/search/solr.nix
index 7200c40e89f..5ef7d9893a4 100644
--- a/nixos/modules/services/search/solr.nix
+++ b/nixos/modules/services/search/solr.nix
@@ -11,13 +11,21 @@ in
 {
   options = {
     services.solr = {
-      enable = mkEnableOption "Enables the solr service.";
+      enable = mkEnableOption "Solr";
 
+      # 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 {