Commit f385d942 authored by Kranium Gikos Mendoza's avatar Kranium Gikos Mendoza
Browse files

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

parent 83006286
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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";
        };
      };
    };
+3 −0
Original line number Diff line number Diff line
@@ -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 ..."