feat: Added nixos module.

This commit is contained in:
2026-10-13 17:03:40 -04:00
parent 94e63dab08
commit 93abd4c3ea
3 changed files with 150 additions and 0 deletions
+27
View File
@@ -94,6 +94,33 @@ run the built binary (`result/libexec/omnisearch`) from a directory containing
Docker also builds from `vendor/beaker`; non-Nix local builds still require
Beaker to be installed separately.
### NixOS service
Import the module from this flake and enable the service:
```nix
{
imports = [ omnisearch.nixosModules.default ];
services.omnisearch = {
enable = true;
openFirewall = true;
settings = {
server = { host = "127.0.0.1"; port = 8087; };
engines.engines = "*";
rate_limit = { search_requests = 10; search_interval = 60; };
};
};
}
```
The module manages a system user, systemd service, persistent cache/state
directories and the asset links needed by OmniSearch. `settings` uses INI
sections and keys matching `example-config.ini`; `extraConfig` appends raw INI
text after those generated settings. Both are embedded in the world-readable
Nix store, so do not put credentials or other secrets in them. The firewall
remains closed unless `openFirewall` is enabled.
## Deploy with Docker Compose
You need Docker or Podman and Docker Compose installed on your system.