diff --git a/README.md b/README.md index 40b68c6..c160bdd 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ The primary goal of `n34` is to implement [NIP-34] (`git` stuff), but its flexible design allows for additional use cases beyond Git workflows. For more details, see the following section. +## Documentation + +Check the documentation at [n34.dev] + ## Features - [X] Repository announcements @@ -57,7 +61,7 @@ into a future-proof foundation for decentralized collaboration. ## Installation You can install n34 either by cloning the repository and building it with Cargo, -or by using `cargo install`. +or by using `cargo install` or Nix. ### Building from source @@ -82,6 +86,31 @@ The binary will be installed to your Cargo binary directory (typically `~/.cargo Make sure `~/.cargo/bin` is in your `PATH` environment variable to run the binary from anywhere. +### Using `nix build` (+v0.4) + +- Clone the repository. +- Run the `nix build` command. + +The binary will be available at `result/bin/n34`. + +### Adding it to your [home-manager] (+v0.4) + +- Add it as an input to your `flake.nix`: + +```nix +inputs = { + # Specify the version you want to install, or remove `?ref` for the unreleased + # version. You can also use any mirror; it doesn't have to be `git.4rs.nl`. + n34.url = "git+https://git.4rs.nl/awiteb/n34.git?ref=refs/tags/vx.y.x"; +}; +``` + +- Add it to your packages (ensure your home-manager `extraSpecialArgs` includes the `inputs`): + +```nix +packages = [ inputs.n34.packages."${pkgs.system}".default ]; +``` + ## Contributing Contributions to `n34` are welcome! You can help by opening issues (such as bug @@ -109,3 +138,5 @@ refer to the [LICENSE](LICENSE) file for more details. [NIP-07]: https://github.com/nostr-protocol/nips/blob/master/07.md [nostr-protocol/nips#1966]: https://github.com/nostr-protocol/nips/pull/1966 [nostr-browser-signer-proxy]: https://crates.io/crates/nostr-browser-signer-proxy +[home-manager]: https://github.com/nix-community/home-manager +[n34.dev]: https://n34.dev diff --git a/docs/index.html b/docs/index.html index c70ebff..52f726e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -211,18 +211,27 @@ border-radius: 8px; font-family: "Courier New", monospace; font-size: 1rem; - color: #00ff00; border: 1px solid #333; overflow-x: auto; margin: 15px 0; } .code-block p { - color: #777; + color: #00ff00; } - .code-block::before { + .code-block p::before { content: "$ "; color: #888; } + .code-block span::before { + content: "$ "; + color: #888; + } + .code-block span { + color: #777; + } + .code-block pre { + color: #00ff00; + } .links { margin-top: 30px; } @@ -412,12 +421,36 @@

Quick Start

Get started with n34 in seconds

-
cargo install n34
+
+

cargo install n34

+ # The execautable will be in ~/.cargo/bin/n34 +

or

- git clone https://git.4rs.nl/awiteb/n34.git && cd n34 && cargo build --release +

git clone https://git.4rs.nl/awiteb/n34.git

+

cd n34 && cargo build --release

+ # The execautable will be in target/release/n34 +
+

NixOS (Version 0.4.0 or later)

+
+

git clone https://git.4rs.nl/awiteb/n34.git

+

cd n34 && nix build

+ # The execautable will be in result/bin/n34 +
+

home-manager

+

Add this to your flake.nix inputs
-

# The execautable will be in target/release/n34

+Specify the version you want to install, or remove ?ref for the unreleased version. You can also use any mirror; it doesn't have to be git.4rs.nl +

+
+
+inputs = {
+  n34.url = "git+https://git.4rs.nl/awiteb/n34.git?ref=refs/tags/vx.y.x";
+};
+
+

And this in your home packages

+
+
packages = [ inputs.n34.packages."${pkgs.system}".default ];

Once installed, run n34 --help to see available commands.