From dfe0f1604f2492a534e14dd7dd12e8981e0c5f4e Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 29 Dec 2020 12:41:05 +0100 Subject: TabNine: provision registration key from private repository --- private | 2 +- user/modules/tabnine.nix | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/private b/private index 435afe77..25b2dfd3 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 435afe7795218fe9487f516f97c1f10e964882fc +Subproject commit 25b2dfd3df605a649e717b9f3b8124f6e3e74c0f 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; + }; }; } -- cgit 1.4.1