{ lib, config, ... }: lib.mkIf (lib.elem "nvim::model" config.machine.pkgs) { programs.nvim-lazy.lazyPlugins = [ { short = "gsuuon/model.nvim"; cmd = [ "M" "Model" "Mchat" ]; init = '' function() vim.filetype.add({ extension = { mchat = 'mchat', } }) end ''; ft = [ "mchat" ]; keys = [ { bind = "d"; cmd = ":Mdelete"; opts = { mode = "n"; }; } { bind = "s"; cmd = ":Mselect"; opts = { mode = "n"; }; } { bind = ""; cmd = ":Mchat"; opts = { mode = "n"; }; } ]; config = '' function() require('model.providers.llamacpp').setup({ binary = '/home/derped/.nix-profile/bin/llama-server', models = '/home/derped/llama/models' }) require('model').setup({ prompts = { tower = { provider = llamacpp, options = { model = 's', args = { '--keep', -1, '-c', 8192, '-ngl', 35 } } } } }) end ''; } ]; }