-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
immich: init at 1.115.0; nixos/immich: init module #324127
Conversation
Does this superseed #244803? |
Yes, I was asked by @Atemu to open a new PR |
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.
Thank you greatly for your work on this! I had some feedback and questions below:
I occasionally see these messages in my logs:
|
ffprobe is provided by the ffmpeg the build already depends on. Perhaps it needs to be wrapped to have access to the binary at runtime. |
Just wanted to say I'm psyched to see this getting added. Thanks for the work! |
45c65e3
to
49d559c
Compare
I have addressed most of the review comments now and rebased onto the current master. This broke albumentations, which I fixed in a seperate commit. |
Yes, I also upgraded my deployment to the latest version of this PR and everything works |
done | ||
|
||
rm "$lock" | ||
cp "$sources_tmp" sources.json |
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.
cp "$sources_tmp" sources.json | |
mv "$sources_tmp" sources.json |
if you don't want to leave temporary files behind
] | ||
++ uvicorn.optional-dependencies.standard; | ||
|
||
doCheck = false; |
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.
Can you add a comment with the reason?
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.
Is there a problem with our opencv4 package?
AttributeError: module 'cv2' has no attribute 'Mat'
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 enable tests in #344237.
# Override Python packages using | ||
# self: super: { pkg = super.pkg.overridePythonAttrs (oldAttrs: { ... }); } | ||
# Applied after defaultOverrides | ||
packageOverrides ? self: super: { }, |
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.
Why would this be needed?
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.
removed in #344237
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.
After understanding the PYTHONPATH
thing my remaining comments shouldn't block the merge.
Given the huge popularity of Immich, I'd like to take a bit of time to really thank all the people involved in packaging this. @jvanbruegge I'd like to thank you for bringing this to the finish line; I know it probably wasn't easy, given this PR was open almost 3 months ago. You started as a user requesting a package and ended up stepping up and sharing your work with the rest of the NixOS community, when it looked like the consensus was having a separate project. I'm sure the community will help you maintain both the package and the module up to date, given the frenetic rate at which Immich is being developed :) There are a couple of unsung heroes I'd like to mention:
And a huge thanks to all the reviewers involved! |
Amazing work! How can I properly integrate this into my nix config? Does anyone have a public server config I can take a look at. |
Thank you @jvanbruegge, just trying to figure out how to integrate this with the differing directories I have things stored in. Thanks again for all your hard work! Very much appreciated! |
back then i wrote this wiki page but not sure if its still up-to date https://wiki.nixos.org/wiki/Immich |
Thank you so much for finally bringing immich to nixos! I have one question: does the default setup support external libraries? Because I tried to add my local picture library on my server to immich as external library, but it cannot access any path I specify. It always gives EACCESS, even though the whole path is readable and executable by everyone. |
@ISibboI This is probably because of the service hardening I did in the first version. You will have to add your directory to a |
This should be done automatically if it's not the default state directory imo. |
I don't think that's the issue, as I also do not use the standard path and have no issues |
Congratulations @jvanbruegge! This was one of the most through reviews I've seen, and you made it through! Thanks for all your hard work as well as the hard work of others to get this merged! |
I was able to migrate my Docker Compose deployment. An issue I ran into was that file paths in the database were relative to immich's working directory, meaning that everything was prefixed with Note This is what worked for my installation that is a few years old. I am not sure if newer installations behave differently. Some facts about my Docker Compose installation:
services.immich = {
enable = true;
mediaLocation = "/media/immich-library";
};
Warning In cases where a file is somehow stuck in your
DROP SCHEMA public CASCADE;
DROP SCHEMA vectors CASCADE;
CREATE SCHEMA public;
CREATE EXTENSION IF NOT EXISTS unaccent;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE EXTENSION IF NOT EXISTS vectors;
CREATE EXTENSION IF NOT EXISTS cube;
CREATE EXTENSION IF NOT EXISTS earthdistance;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
ALTER SCHEMA public OWNER TO immich;
ALTER SCHEMA vectors OWNER TO immich;
GRANT SELECT ON TABLE pg_vector_index_stat TO immich;
ALTER EXTENSION vectors UPDATE;
If any of these steps fail, you should have your original (unmodified!) database as well as a backup of your media location. 1: As a precaution, you could make your existing Immich library read-only (i.e. chown -R I hope this helps someone out there trying to get this working. |
@Scrumplex could you PR that into a migration doc and link it in the patch notes? |
Thank you @Scrumplex, I've been working on migration now, luckily I had a backup of my sql because I've broken it hahaha |
I have written more in the last hour than I did on average per day for my bachelor's thesis. 😅 See #344300 for my proposed NixOS manual documentation. It also includes a much better I'll keep "Allow edits and access to secrets by maintainers" on in case someone with commit access wants to commit changes into my PR. I will go to bed now! 💤 |
Found an issue with the module, when running
|
Anyone had success testing this on aarch64? |
If you use a non-socket postgres connection then |
@bct i believe that is a bug, I can also reproduce. |
Yes, that probably got lost somewhere during all of the rebasing for the reviews |
It tries to build Moreover |
Sorry to interject but please create separate issues rather than commenting on this PR unless it is specifically something that requires the attention of the people who were involved in this PR. A lot of people are subscribed and this code is in Nixpkgs now, so it should be treated like any other Nixpkgs code. |
Description of changes
This adds the package, nixos module and nixos test for immich
Closes #244803
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.