feat: Added nixos module.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user