From cceefa62d147594d43478e398bbaa9c630670935 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 11 May 2024 14:28:09 -0400 Subject: Setup ollama API service This superceedes exllama and tabbyAPI which I could never get working fully. Unfortunately I had to switch to NixOS unstable to get all the Go builder stuff to work, so this is a cause of yet another version drift, but I guess it's inevitable and I should just learn to mitigate it with my nixpkgs shenanigans. --- Biz/Bild.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Biz/Bild.nix') diff --git a/Biz/Bild.nix b/Biz/Bild.nix index 859d070..ec049d8 100644 --- a/Biz/Bild.nix +++ b/Biz/Bild.nix @@ -11,6 +11,9 @@ let stdenv = nixpkgs.nixos-23_11.ccacheStdenv; }; + # just needed for running ollama + unstable = nixpkgs.nixos-unstable-small; + # this is the main library definitions, recursive references can be made with # `self.thing`, like in Python objects self = { @@ -79,6 +82,7 @@ let inherit bat bc cmark ctags deadnix fd figlet fzf git git-branchless gitlint guile hlint indent jq lolcat mypy nixfmt ormolu pkg-config ripgrep rustc tree wemux; + ollama = nixpkgs.nixos-unstable-small.ollama; ruff = nixpkgs.nixos-unstable-small.ruff; shellcheck = nixpkgs.nixos-unstable-small.shellcheck; }; @@ -195,6 +199,7 @@ let # build an operating system. 'cfg' is the NixOS config os = cfg: (stable.nixos (_args: cfg)).toplevel; + os-unstable = cfg: (unstable.nixos (_args: cfg)).toplevel; # build a docker image image = stable.dockerTools.buildImage; -- cgit v1.2.3