summaryrefslogtreecommitdiff
path: root/Biz/Bild.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2024-05-11 14:28:09 -0400
committerBen Sima <ben@bsima.me>2024-05-20 22:15:49 -0400
commitcceefa62d147594d43478e398bbaa9c630670935 (patch)
tree458b468f271c156a7e91944e58d2861afd5e1dab /Biz/Bild.nix
parentdd0bc9610cf0e6842f5d5ac67a73f2fd6f4eba2f (diff)
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.
Diffstat (limited to 'Biz/Bild.nix')
-rw-r--r--Biz/Bild.nix5
1 files changed, 5 insertions, 0 deletions
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;