diff options
| author | adi <adikro@disroot.org> | 2026-07-29 17:09:58 +0200 |
|---|---|---|
| committer | adi <adikro@disroot.org> | 2026-07-29 17:09:58 +0200 |
| commit | 39a2b09c27bb74c9e59d1772764f901e3c8fb9e4 (patch) | |
| tree | 0ba58e6fbf086a85d875df1c10f6d23bc3bbc7da /os/srv/omnisearch.nix | |
| parent | 8a820cacee1ff07ae7397d053b26e66f7086a4a4 (diff) | |
revamped flake.nix, removed homelab specific modulesstaging
Diffstat (limited to 'os/srv/omnisearch.nix')
| -rw-r--r-- | os/srv/omnisearch.nix | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/os/srv/omnisearch.nix b/os/srv/omnisearch.nix deleted file mode 100644 index ac36184..0000000 --- a/os/srv/omnisearch.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ - config, - lib, - inputs, - masterDomain, - templates, - ... -}: -let - cfg = config.os.srv.omnisearch; -in -{ - imports = [ inputs.omnisearch.nixosModules.default ]; - - options.os.srv.omnisearch = { - enable = lib.mkEnableOption "enables omnisearch tracking infrastructure"; - - role = lib.mkOption { - type = lib.types.enum [ - "server" - "standalone" - ]; - default = "standalone"; - description = "Designates the deployment method"; - }; - }; - - config = lib.mkIf cfg.enable ( - lib.mkMerge [ - { - services.omnisearch = { - enable = true; - settings = { - server = { - host = "127.0.0.1"; - port = 8087; - locale = "en"; - domain = if cfg.role == "server" then "https://search.${masterDomain}" else "http://localhost:8087"; - }; - proxy = { - max_retries = 3; - randomize_username = true; - randomize_password = true; - }; - cache = { - dir = "/var/cache/omnisearch"; - ttl_search = 1800; - ttl_infobox = 86400; - }; - }; - }; - } - - (lib.mkIf (cfg.role == "server") { - assertions = [ - { - assertion = config.os.srv.nginx.enable; - message = "Required for proxying"; - } - ]; - services.nginx.virtualHosts."search.${masterDomain}" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:8087"; - proxyWebsockets = true; - extraConfig = templates.restrictToInternal; - }; - }; - }) - ] - ); -} |
