Skip to content

Commit

Permalink
nix: update readme (#1064)
Browse files Browse the repository at this point in the history
Include the instructions for running nim-codex as a systemd service on
NixOS.

Signed-off-by: markoburcul <[email protected]>
  • Loading branch information
markoburcul authored Jan 14, 2025
1 parent 0cffa02 commit 39e8e6e
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion nix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,28 @@ nix run 'git+https://github.com/codex-storage/nim-codex?submodules=1#''
```sh
nix flake check ".?submodules=1#"
```
```
## Running Nim-Codex as a service on NixOS
Include nim-codex flake in your flake inputs:
```nix
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nim-codex-flake.url = "git+https://github.com/codex-storage/nim-codex?submodules=1#";
};
```
To configure the service, you can use the following example:
```nix
services.nim-codex = {
enable = true;
settings = {
data-dir = "/var/lib/codex-test";
};
};
```
The settings attribute set corresponds directly to the layout of the TOML configuration file
used by nim-codex. Each option follows the same naming convention as the CLI flags, but
with the -- prefix removed. For more details on the TOML file structure and options,
refer to the official documentation: [nim-codex configuration file](https://docs.codex.storage/learn/run#configuration-file).

0 comments on commit 39e8e6e

Please sign in to comment.