feat: updated abstractions

This commit is contained in:
Nick 2025-12-10 18:09:00 -06:00
parent 4512d7a5d9
commit 9aab8c6444
31 changed files with 70 additions and 97 deletions

View file

@ -1,9 +1,6 @@
{ flake, osConfig, ... }:
{ flake, ... }:
let
inherit (flake.config.services) instances;
inherit (flake.config.machines) devices;
localhost = instances.web.localhost.address0;
hostname = osConfig.networking.hostName;
in
{
"${instances.jellyfin.label}" = {
@ -13,26 +10,26 @@ in
icon = ./icons/jf.png;
urls = [
{
template = "https://${instances.jellyfin.subdomain}.${instances.web.domains.url0}/web/#/search.html?query={searchTerms}";
}
];
};
"${instances.searx.label}" = {
definedAliases = [
"@sx"
];
icon = ./icons/sx.png;
urls = [
{
template =
(
if hostname == devices.mars.name then
"http://${localhost}:${toString instances.searx.ports.port0}"
else
"https://${instances.searx.subdomain}.${instances.web.domains.url0}"
)
+ "/search?q={searchTerms}";
template = "https://${instances.jellyfin.interfaces.interface0.domain}/web/#/search.html?query={searchTerms}";
}
];
};
# "${instances.searx.label}" = {
# definedAliases = [
# "@sx"
# ];
# icon = ./icons/sx.png;
# urls = [
# {
# template =
# (
# if hostname == devices.mars.name then
# "http://${localhost}:${toString instances.searx.ports.port0}"
# else
# "https://${instances.searx.subdomain}.${instances.web.domains.url0}"
# )
# + "/search?q={searchTerms}";
# }
# ];
# };
}