about summary refs log tree commit diff stats
path: root/docs/running.md
diff options
context:
space:
mode:
authorAlan Pearce2024-05-22 13:29:26 +0200
committerAlan Pearce2024-05-22 13:29:26 +0200
commit53a00f3ac15f1d32693a4db1b32c5af583b68f6b (patch)
tree2ee5829aa80f77c5be3d06e3ec5d9b7b41289d93 /docs/running.md
parent4197ece130242467189b39619f9e9c6b272b8474 (diff)
downloadsearchix-53a00f3ac15f1d32693a4db1b32c5af583b68f6b.tar.lz
searchix-53a00f3ac15f1d32693a4db1b32c5af583b68f6b.tar.zst
searchix-53a00f3ac15f1d32693a4db1b32c5af583b68f6b.zip
docs: document how to run an instance
Diffstat (limited to 'docs/running.md')
-rw-r--r--docs/running.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/running.md b/docs/running.md
new file mode 100644
index 0000000..8310c99
--- /dev/null
+++ b/docs/running.md
@@ -0,0 +1,44 @@
+# Running an instance
+
+## Requirements:
+
+-   400MiB disk space
+-   <100MiB RAM
+
+This [repository](https://git.alanpearce.eu/searchix) (or its [sourcehut mirror](https://git.sr.ht/~alanpearce/searchix)) is importable as a flake containing a NixOS module.
+
+```nix
+{
+  inputs.searchix.url = "git+https://git.alanpearce.eu/searchix";
+  # or
+  inputs.searchix.url = "sourcehut:~alanpearce/searchix";
+
+  outputs = { self, nixpkgs, searchix }: {
+    nixosConfigurations.<hostname> = nixpkgs.lib.nixosSystem {
+      modules = [
+        searchix.modules.web
+      ];
+    };
+  };
+}
+```
+
+This will then expose the following schema:
+
+```nix
+services.searchix = {
+  enable = true;
+# user = "searchix";
+# group = "searchix";
+# homeDir = "/var/lib/searchix";
+# settings = {
+#   web = {
+#     port = 51313;
+#     listenAddress = "localhost";
+#     baseURL = "http://localhost:51313";
+#   };
+# };
+};
+```
+
+Where `settings` complies with [NixOS RFC 42 (settings options)](https://github.com/NixOS/rfcs/pull/42); see the [default values](../defaults.toml) for reference.