grimm-nixos-laptop/modules/search.nix

115 lines
2.6 KiB
Nix
Raw Normal View History

2025-02-25 13:24:22 +01:00
{ config, ... }:
let
inherit (config.serverConfig) ports vhosts;
inherit (config.networking) domain;
in
2025-02-25 22:10:40 +01:00
# searx_host
# searx_secret_key.age
2025-02-25 13:24:22 +01:00
{
2025-02-25 22:10:40 +01:00
age.secrets.searx_env = {
file = ../secrets/searx_environment.age;
owner = config.systemd.services.searx.serviceConfig.User;
group = config.systemd.services.searx.serviceConfig.Group;
mode = "0600";
};
services.searx = {
enable = true;
environmentFile = config.age.secrets.searx_env.path;
redisCreateLocally = true;
settings = {
general = {
# debug = true;
contact_url = "mailto:grimmauld@${domain}";
};
server = {
inherit (vhosts.searx_host) port;
bind_address = "127.0.0.1";
secret_key = "@SEARX_SECRET_KEY@";
# default_locale = "en";
};
categories_as_tabs = {
general = { };
images = { };
map = { };
# music:
repo = { };
it = { };
science = { };
};
engines = [
{
name = "forgejo.grimmauld";
shortcut = "fj_grimm";
categories = [
"repo"
"it"
];
engine = "gitea";
weight = 10;
base_url = "https://git.grimmauld.de";
}
{
name = "forgejo";
shortcut = "forgejo";
categories = [
"repo"
"it"
];
engine = "gitea";
base_url = "https://code.forgejo.org";
}
{
name = "codeberg";
shortcut = "codeberg";
categories = [
"repo"
"it"
];
engine = "gitea";
base_url = "https://codeberg.org/";
}
{
name = "gitea.com";
shortcut = "gitea";
categories = [
"repo"
"it"
];
engine = "gitea";
base_url = "https://gitea.com";
}
{
name = "gitlab";
shortcut = "gitlab";
categories = [
"repo"
"it"
];
engine = "gitlab";
base_url = "https://gitlab.com";
}
{
name = "gitlab.gnome";
shortcut = "gitlab_gnome";
categories = [
"repo"
"it"
];
engine = "gitlab";
base_url = "https://gitlab.gnome.org";
}
{
name = "github";
shortcut = "gh";
categories = [
"repo"
"it"
];
engine = "github";
}
];
};
};
2025-02-25 13:24:22 +01:00
}