configs/emacs: add ollama wrapper
This commit is contained in:
parent
4b3cb69462
commit
551118f50e
@ -11,4 +11,11 @@ emacsWithPackagesFromUsePackage {
|
||||
|
||||
defaultInitFile = true;
|
||||
package = emacsPkg;
|
||||
|
||||
override = epkgs: epkgs // {
|
||||
ollama = pkgs.callPackage ../pkgs/ollama-el.nix {
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
inherit (epkgs) trivialBuild;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -123,6 +123,19 @@ here.
|
||||
|
||||
* Packages
|
||||
|
||||
** ollama
|
||||
|
||||
Simple wrapper for ~ollama~ that lets me pipe regions and what not into various buffers.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ollama
|
||||
:init
|
||||
(setopt
|
||||
ollama:endpoint "https://ollama.otter-alligator.ts.net/api/generate"
|
||||
ollama:language "English"
|
||||
ollama:model "llama3"))
|
||||
#+end_src
|
||||
|
||||
** web-mode
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
14
pkgs/ollama-el.nix
Normal file
14
pkgs/ollama-el.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ trivialBuild
|
||||
, fetchFromGitHub
|
||||
, ...
|
||||
}:
|
||||
trivialBuild {
|
||||
pname = "ollama";
|
||||
version = "unstable-2023-08-28";
|
||||
src = fetchFromGitHub {
|
||||
owner = "zweifisch";
|
||||
repo = "ollama";
|
||||
rev = "19e8babd6eceef37ca4bf9a58bc666d0e55b70c6";
|
||||
hash = "sha256-u3+V7bLH/l2hcVoSdQYsQNKDpz4pwPFjAn1ED8vSk50=";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user