summary refs log tree commit diff stats
path: root/user/modules
diff options
context:
space:
mode:
authorAlan Pearce2020-12-29 12:41:05 +0100
committerAlan Pearce2020-12-29 20:00:43 +0100
commitdfe0f1604f2492a534e14dd7dd12e8981e0c5f4e (patch)
treeb161509e453f9e5e384f30ba3a9a67a13ac4296c /user/modules
parent24faceb23414ff82f063b34ed68f88c3e1629544 (diff)
downloadnixfiles-dfe0f1604f2492a534e14dd7dd12e8981e0c5f4e.tar.lz
nixfiles-dfe0f1604f2492a534e14dd7dd12e8981e0c5f4e.tar.zst
nixfiles-dfe0f1604f2492a534e14dd7dd12e8981e0c5f4e.zip
TabNine: provision registration key from private repository
Diffstat (limited to 'user/modules')
-rw-r--r--user/modules/tabnine.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/user/modules/tabnine.nix b/user/modules/tabnine.nix
index c2b9a746..1eef84ae 100644
--- a/user/modules/tabnine.nix
+++ b/user/modules/tabnine.nix
@@ -41,6 +41,13 @@ in
       '';
     };
 
+    registrationKey = mkOption {
+      type = types.str;
+      description = ''
+        Registration key for TabNine.  For one-time-purchase users, this should be the e-mail address and base-64-encoded key joined together without spacing.
+      '';
+    };
+
     lspConfig = mkOption {
       type = types.attrs;
       default = {};
@@ -59,5 +66,8 @@ in
     home.file."${cfg.configDir}/tabnine_config.json" = {
       source = pkgs.writeText "tabnine_config.json" (builtins.toJSON cfg.config);
     };
+    home.file."${cfg.configDir}/registration_key" = {
+      text = cfg.registrationKey;
+    };
   };
 }