mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
Compare commits
2 commits
de5314fc31
...
a94e7e8898
| Author | SHA1 | Date | |
|---|---|---|---|
| a94e7e8898 | |||
| aa67599152 |
2 changed files with 49 additions and 0 deletions
|
|
@ -71,6 +71,11 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "home.${config.custom.networking.overlay.domain}";
|
domain = "home.${config.custom.networking.overlay.domain}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
searxng = {
|
||||||
|
enable = true;
|
||||||
|
domain = "search.${config.custom.networking.overlay.domain}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
44
modules/nixos/web-services/searxng.nix
Normal file
44
modules/nixos/web-services/searxng.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.custom.web-services.searxng;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.custom.web-services.searxng = {
|
||||||
|
enable = lib.mkEnableOption "";
|
||||||
|
domain = lib.mkOption {
|
||||||
|
type = lib.types.nonEmptyStr;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
port = lib.mkOption {
|
||||||
|
type = lib.types.port;
|
||||||
|
default = 27916;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.searx = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
port = cfg.port;
|
||||||
|
secret_key = "unnecessary";
|
||||||
|
};
|
||||||
|
ui.center_alignment = true;
|
||||||
|
plugins = {
|
||||||
|
"searx.plugins.calculator.SXNGPlugin".active = true;
|
||||||
|
"searx.plugins.infinite_scroll.SXNGPlugin".active = true;
|
||||||
|
"searx.plugins.self_info.SXNGPlugin".active = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
custom = {
|
||||||
|
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||||
|
|
||||||
|
meta.sites.${cfg.domain} = {
|
||||||
|
title = "SearXNG";
|
||||||
|
icon = "sh:searxng";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue