aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-06-01 19:24:45 +0200
committerNatasha Moongrave <natasha@256phi.eu>2026-06-01 19:24:45 +0200
commit4bfaeecd660880a018b5715f541ae1eb877f5d4c (patch)
tree9296f8d835d50eaee881eb3a2d9a1015496978e7
parent7b3e5f20f0c321fb954c13281af0f92721775289 (diff)
Added a local ai stack to herra
-rw-r--r--hosts/herra/ai.nix51
-rw-r--r--hosts/herra/arion-compose.nix50
2 files changed, 101 insertions, 0 deletions
diff --git a/hosts/herra/ai.nix b/hosts/herra/ai.nix
new file mode 100644
index 0000000..9ca7632
--- /dev/null
+++ b/hosts/herra/ai.nix
@@ -0,0 +1,51 @@
+{pkgs, ...}: {
+ virtualisation.docker.enable = true;
+
+ environment.systemPackages = with pkgs; [
+ arion
+ ];
+
+ services.ollama = {
+ enable = true;
+
+ host = "0.0.0.0";
+ port = 11434;
+
+ # probably won't work reliably on Polaris
+ # acceleration = "rocm";
+ };
+
+ services.nginx = {
+ enable = true;
+
+ virtualHosts."ai.local" = {
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:7000";
+ proxyWebsockets = true;
+ };
+ };
+ };
+
+ environment.etc."arion/arion-compose.nix".source =
+ ./arion-compose.nix;
+
+ systemd.services.odysseus = {
+ wantedBy = ["multi-user.target"];
+
+ after = [
+ "docker.service"
+ "ollama.service"
+ ];
+
+ serviceConfig = {
+ Type = "oneshot";
+ RemainAfterExit = true;
+
+ WorkingDirectory = "/etc/arion";
+
+ ExecStart = "${pkgs.arion}/bin/arion up -d";
+
+ ExecStop = "${pkgs.arion}/bin/arion down";
+ };
+ };
+}
diff --git a/hosts/herra/arion-compose.nix b/hosts/herra/arion-compose.nix
new file mode 100644
index 0000000..daa4077
--- /dev/null
+++ b/hosts/herra/arion-compose.nix
@@ -0,0 +1,50 @@
+{pkgs, ...}: {
+ project.name = "odysseus";
+
+ services.odysseus.service = {
+ image = "ghcr.io/pewdiepie-archdaemon/odysseus:latest";
+
+ ports = [
+ "7000:7000"
+ ];
+
+ volumes = [
+ "/srv/odysseus/data:/app/data"
+ ];
+
+ environment = {
+ AUTH_ENABLED = "true";
+
+ LLM_HOST = "host.docker.internal:11434";
+
+ CHROMADB_HOST = "chromadb";
+
+ SEARXNG_INSTANCE = "http://searxng:8080";
+ };
+
+ extra_hosts = [
+ "host.docker.internal:host-gateway"
+ ];
+
+ depends_on = [
+ "chromadb"
+ "searxng"
+ ];
+ };
+
+ services.chromadb.service = {
+ image = "chromadb/chroma:latest";
+
+ volumes = [
+ "/srv/odysseus/chroma:/chroma/chroma"
+ ];
+ };
+
+ services.searxng.service = {
+ image = "searxng/searxng:latest";
+ };
+
+ services.ntfy.service = {
+ image = "binwiederhier/ntfy:latest";
+ };
+}