summary refs log tree commit diff stats
path: root/user/settings
diff options
context:
space:
mode:
authorAlan Pearce2022-10-16 23:33:13 +0200
committerAlan Pearce2022-10-16 23:50:04 +0200
commit472dbbdbb246cf3d8ce3a5c3c6cefaa07b7589df (patch)
tree99ebeadcb837ea2cd4019a2f9d3298927dd4b007 /user/settings
parent82cd148ed09ff40fa765ca2d12e5d1b2d3b8a194 (diff)
downloadnixfiles-472dbbdbb246cf3d8ce3a5c3c6cefaa07b7589df.tar.lz
nixfiles-472dbbdbb246cf3d8ce3a5c3c6cefaa07b7589df.tar.zst
nixfiles-472dbbdbb246cf3d8ce3a5c3c6cefaa07b7589df.zip
Use tabnine from nixpkgs
Diffstat (limited to 'user/settings')
-rw-r--r--user/settings/tabnine.nix72
1 files changed, 27 insertions, 45 deletions
diff --git a/user/settings/tabnine.nix b/user/settings/tabnine.nix
index 78b8a513..dab2273b 100644
--- a/user/settings/tabnine.nix
+++ b/user/settings/tabnine.nix
@@ -1,59 +1,45 @@
 { config, pkgs, ... }:
 
-let
-  inherit (pkgs) stdenv;
-
-  version = "3.2.28";
-  target = if stdenv.isDarwin then
-  "x86_64-apple-darwin"
-  else
-  "x86_64-unknown-linux-musl";
-
-  tabninePackage = (pkgs.fetchurl {
-    url = "https://update.tabnine.com/${version}/${target}/TabNine";
-    sha256 = if stdenv.isDarwin then
-    "174dsbdah99576g0g31402bdb02lfnq7sbac4i9g69alklbrghxd"
-    else
-    "0lh770gjxlgx01rb8qn079nf04qs3nirahzsld1ga5v3l16wqvqh";
-  });
-in {
+{
   imports = [ ../modules/tabnine.nix ];
+  home.packages = with pkgs; [
+    tabnine
+  ];
   programs.tabnine = {
     enable = true;
     config = {
-      inherit version;
+      version = pkgs.tabnine.version;
 
       hide_promotional_message = true;
       beta_enabled = "No";
-      binary_update_interval_seconds = null;
       ignore_all_lsp = false;
-      creation_time = "2020-04-23T10:42:35.732522096Z";
+      creation_time = "2020-12-28T21:42:35.732522096Z";
       semantic_status = {
         typescript = "Enabled";
         javascript = "Enabled";
         yaml = "Enabled";
       };
       disable_auto_update = true;
-      user_understands_that_enabling_tabnine_cloud_sends_code_to_tabnine_servers =
-        false;
-        hosted_deep_completions_enabled = "Disabled";
-        tabnine_cloud_certificate_domain = null;
-        tabnine_cloud_host = null;
-        tabnine_cloud_port = null;
-        cloud_whitelist = [ ];
-        api_key = null;
-        api_key_service_level = null;
-        api_base_url = null;
-        local_enabled = "Yes";
-        local_indexing = null;
-        local_model_size = null;
-        disable_local_when_using_battery = false;
-        hide_deep_information_message = false;
-        enable_power_saving_mode = false;
-        enable_telemetry = false;
-        generation = "0";
-        rate_limit_interval_seconds = null;
-        rate_limit_amount = null;
+      binary_update_interval_seconds = 365 * 24 * 3600;
+      deep_completions_work_mode = "LocalOnly";
+      hosted_deep_completions_enabled = "Disabled";
+      tabnine_cloud_certificate_domain = null;
+      tabnine_cloud_host = null;
+      tabnine_cloud_port = null;
+      cloud_whitelist = [ ];
+      api_key = null;
+      api_key_service_level = null;
+      api_base_url = null;
+      local_enabled = "Yes";
+      local_indexing = null;
+      local_model_size = null;
+      disable_local_when_using_battery = false;
+      hide_deep_information_message = false;
+      enable_power_saving_mode = false;
+      enable_telemetry = false;
+      generation = "0";
+      rate_limit_interval_seconds = null;
+      rate_limit_amount = null;
     };
     lspConfig = {
       "language.typescript" = {
@@ -98,11 +84,7 @@ in {
     };
   };
 
-  home.file.".local/tabnine/${version}/${target}/TabNine" = {
-    executable = true;
-    source = tabninePackage;
-  };
   programs.neovim.coc.config = {
-    "tabnine.binary_path" = "${tabninePackage}";
+    "tabnine.binary_path" = "${pkgs.tabnine}/bin/TabNine";
   };
 }