-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Karakeep cache dir #416531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Karakeep cache dir #416531
Conversation
8a1e76e
to
e4c84e1
Compare
|
e4c84e1
to
b8346b9
Compare
b8346b9
to
1df2d89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this on my own setup and I don't see the cache errors anymore. Thanks for this fix!
# provide a environment variable to override the cache directory | ||
# https://github.com/vercel/next.js/discussions/58864 | ||
# solution copied from nextjs-ollama-llm-ui | ||
substituteInPlace $out/lib/karakeep/apps/web/.next/standalone/node_modules/next/dist/server/image-optimizer.js \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a patch instead?
Next.js image optimizer is trying to create directories in the nix store whenever a link is added, and in my personal instance that meant that I got no details except the URL visible in the app.
This PR (which is based on PR #412414) solves this by changing a function call in the built package, making the cache dir configurable using an environment variable.
This is coupled with setting that variable to
$CACHE_DIR
in the nixos module so the systemd unit takes care of it.I haven't been able to test this in noninteractive nixosTest since I need to create an account in the browser before I can use the CLI.
Here's what it looked like before:
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.