nextjs-ollama-llm-ui: fix nextjs cache dir (#344316)

This commit is contained in:
Kranium Gikos Mendoza 2024-10-11 17:35:37 +11:00
parent 830062864f
commit f385d942e1
2 changed files with 5 additions and 1 deletions

View File

@ -52,7 +52,7 @@ in
ollamaUrl = lib.mkOption {
type = lib.types.str;
default = "127.0.0.1:11434";
default = "http://127.0.0.1:11434";
example = "https://ollama.example.org";
description = ''
The address (including host and port) under which we can access the Ollama backend server.
@ -79,6 +79,7 @@ in
serviceConfig = {
ExecStart = "${lib.getExe nextjs-ollama-llm-ui}";
DynamicUser = true;
CacheDirectory = "nextjs-ollama-llm-ui";
};
};
};

View File

@ -64,6 +64,9 @@ buildNpmPackage {
mkdir -p $out/share/homepage/.next
cp -r .next/static $out/share/homepage/.next/static
# https://github.com/vercel/next.js/discussions/58864
ln -s /var/cache/nextjs-ollama-llm-ui $out/share/homepage/.next/cache
chmod +x $out/share/homepage/server.js
# we set a default port to support "nix run ..."