hosts/library: add jellysearch
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m17s

This commit is contained in:
2025-06-22 14:21:39 +01:00
parent fed69bbc80
commit e0c0ae3ee7
4 changed files with 49 additions and 6 deletions

8
flake.lock generated
View File

@ -1000,11 +1000,11 @@
"secrets": {
"flake": false,
"locked": {
"lastModified": 1748905535,
"narHash": "sha256-lRWIpo//dTT7kqtiuaeAITbL535eHImpcpcIfAg2wxs=",
"lastModified": 1750597864,
"narHash": "sha256-0RJ4opKFAFftQo+E68ZuDZK66UxFlRYVYlYyYCa3u+M=",
"ref": "refs/heads/master",
"rev": "c6f23eddf543b4de1c8c596e51be1d5ba1137673",
"revCount": 32,
"rev": "b6a77c1782d3e5a65849e2ccf844384155f006be",
"revCount": 33,
"type": "git",
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
},

View File

@ -8,6 +8,7 @@
./ai.nix
./grafana.nix
./jellyfin.nix
./jellysearch.nix
./nginx.nix
./prometheus.nix
./tunnel.nix

View File

@ -0,0 +1,34 @@
{
inputs,
config,
...
}:
{
age.secrets."files/services/meilisearch/envfile" = {
file = "${inputs.secrets}/files/services/meilisearch/envfile.age";
};
services.meilisearch = {
enable = true;
masterKeyEnvironmentFile = config.age.secrets."files/services/meilisearch/envfile".path;
};
virtualisation.oci-containers.containers = {
jellysearch = {
image = "domistyle/jellysearch";
environment = {
INDEX_CRON = "0 0 0/2 ? * * *";
JELLYFIN_URL = "http://localhost:8096";
MEILI_URL = "http://localhost:${toString config.services.meilisearch.listenPort}";
};
environmentFiles = [
config.age.secrets."files/services/meilisearch/envfile".path
];
volumes = [
"${toString config.services.jellyfin.configDir}:/config:ro"
];
extraOptions = [ "--network=host" ];
};
};
}

View File

@ -63,9 +63,17 @@
}
];
locations."/" = {
proxyPass = "http://localhost:8096";
extraConfig =
proxyConfig
''
# Proxy JellySearch first
if ($arg_searchTerm) {
proxy_pass http://localhost:5000;
break;
}
proxy_pass http://localhost:8096;
''
+ proxyConfig
+ ''
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;