-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
karakeep: module tweaks and added module test #412414
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?
Conversation
Requested review from module and package maintainer @three. |
@ofborg test karakeep |
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 appreciate the cleanup! I did have a question about how setting services.karakeep.environmentFiles
from within the module works. Otherwise this looks good.
I found this behavior in another module, I'll try to find it. I thought it made sense to use the default behavior of option merging :). EDIT:
|
Sorry for quite a big commit. It might be good to check the diff ignoring whitespace since indentation changed. Some notes: DATA_DIR is protected as it is set to read-only:
environmentFile is now deprecated properly, it gives a warning but still works (by turning the value into a list and assigning to environmentFiles):
|
I need to add descriptions to all options, I'll do that today. |
Hi @tetov , karakeep 0.25.0 just got released. Can you also update the pkg to latest version if you know how its nix packaging works? |
cc @three |
I'll update it, no problem. I want to do it in a separate PR though. Also, I'm preparing another PR targeting the package to fix the process trying to write to But let's keep it module focused in this one :). |
I also saw this error but don't know much about nextJS so couldn't solve it. can you link the PR here once you figure out the fix. will help me learn something new :) Thanks :) |
1a2876b
to
1fb8851
Compare
1fb8851
to
1525adb
Compare
getting this error after upgrading from prev versions.
@tetov can you add i've tested this on my machine and setting docs for the same: https://www.meilisearch.com/docs/learn/update_and_migration/updating#dumpless-upgrade |
Thanks for reporting @HritwikSinghal. I'm unsure if I should add more to this PR or make that another. I have prepared a branch that I can either merge into this one or use in a new PR. https://github.com/tetov/nixpkgs/tree/karakeep_dumpless @three: What's your take? Also, I'd be happy to be co-maintainer if you would like that. |
This comment was marked as resolved.
This comment was marked as resolved.
@ofborg build karakeep karakeep.passthru.tests |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/2470 |
- Added a nixos test which mainly targets environment variables HOST and PORT. No non graphical way to generate api token found so not sure how to test more. - Changed how the systemd environment is constructed using attribute merging - environmentFiles added to replace environmentFile, which is hidden but still supported (with a deprecation warning). This fits well with how the env file generated in the init service unit is added to web and workers.
DATA_DIR is protected as it is set to read-only: error: The option `nodes.karakeep_server.services.karakeep.extraEnvironment.DATA_DIR' is read-only, but it's set multiple times. Definition values: - In `/nix/store/AAA-source/nixos/modules/services/web-apps/karakeep.nix': "/var/lib/karakeep" - In `/nix/store/AAA-source/nixos/tests/web-apps/karakeep.nix': "/something/else" environmentFile is now deprecated properly, it gives a warning but still works (by turning the value into a list and assigning to environmentFiles): evaluation warning: The option `services.karakeep.environmentFile' defined in `/nix/store/AAA-source/nixos/tests/web-apps/karakeep.nix' has been changed to `services.karakeep.environmentFiles' that has a different type. Please read `services.karakeep.environmentFiles' documentation and update your configuration accordingly.
1525adb
to
36108e9
Compare
Fixed merge conflict. |
I started this PR with the intent to expose host and port as their own options but after going through similar modules I found that that is not typically done. I had already written a test and done some refactoring so I decided to open a PR anyways.
Added a nixos test which mainly targets environment variables HOST and PORT.
No non graphical way to generate api token found so not sure how to test more.
Changed how the systemd environment is constructed using attribute merging
environmentFiles added to replace environmentFile, which is hidden but still
supported (with a deprecation warning). This fits well with how the env file
generated in the init service unit is added to web and workers.
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.