diff --git a/modules/hm/vim.nix b/modules/hm/vim.nix index 7d97f59..fdd3c02 100644 --- a/modules/hm/vim.nix +++ b/modules/hm/vim.nix @@ -403,21 +403,13 @@ in plugin = vp.ollama-nvim; type = "lua"; config = '' - function readAll(file) - local f = assert(io.open(file, "rb")) - local content = f:read("*all") - f:close() - return content - end - local url = readAll("${nixosConfig.age.secrets.ollama.path}") - - print(vim.inspect(url)) - - local ollama = require("ollama") - ollama:setup({ - url = url, + local token = readAll("${nixosConfig.age.secrets.ollama.path}") + local conf = { + -- url = string.format("https://bertof:%s@ollama.ricerca.sesar.di.unimi.it/", token), model = "codegemma:7b" - }) + } + local ollama = require("ollama") + ollama.setup(conf) ''; } ]; @@ -428,6 +420,13 @@ in # let g:airline_powerline_fonts = 1 # ''; extraLuaConfig = '' + function readAll(file) + local f = assert(io.open(file, "rb")) + local content = f:read("*all") + f:close() + return string.gsub(content, "%s+", "") + end + -- Setup local o = vim.o local g = vim.g diff --git a/secrets/ollama.age b/secrets/ollama.age index 6301710..4184f91 100644 Binary files a/secrets/ollama.age and b/secrets/ollama.age differ