summary refs log tree commit diff
path: root/host/Rory-portable/ollama.nix
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-portable/ollama.nix')
-rwxr-xr-xhost/Rory-portable/ollama.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/host/Rory-portable/ollama.nix b/host/Rory-portable/ollama.nix
new file mode 100755
index 0000000..15b347b
--- /dev/null
+++ b/host/Rory-portable/ollama.nix
@@ -0,0 +1,17 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.ollama = {
+    enable = true;
+    home = "/data/ollama/home";
+    models = "/data/ollama/home/models";
+    environmentVariables = {
+      OLLAMA_LLM_LIBRARY = "cpu_avx2";
+    };
+    writablePaths = [ "/data/ollama/home" ];
+    #listenAddress = "0.0.0.0:11434";
+    host = "0.0.0.0";
+    port = 11434;
+    sandbox = false;
+  };
+}