hosts/library: add jellysearch
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m17s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m17s
This commit is contained in:
8
flake.lock
generated
8
flake.lock
generated
@ -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"
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
|
34
hosts/library/jellysearch.nix
Normal file
34
hosts/library/jellysearch.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -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;
|
||||||
|
Reference in New Issue
Block a user