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

View File

@ -8,6 +8,7 @@
./ai.nix ./ai.nix
./grafana.nix ./grafana.nix
./jellyfin.nix ./jellyfin.nix
./jellysearch.nix
./nginx.nix ./nginx.nix
./prometheus.nix ./prometheus.nix
./tunnel.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."/" = { locations."/" = {
proxyPass = "http://localhost:8096";
extraConfig = 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 Range $http_range;
proxy_set_header If-Range $http_if_range; proxy_set_header If-Range $http_if_range;