Skip to content

nix-community/ethereum.nix

Repository files navigation

Ethereum.nix = Ethereum 🫶 Nix

Ethereum Ecosystem Built with nix License

Ethereum.nix is a collection of Nix packages and NixOS modules designed to make it easier to operate Ethereum related services and infrastructure.

For the uninitiated, using Ethereum.nix will give you the following benefits:

  • Access to a wide range of Ethereum applications packaged with Nix, ready to run without fuss. Nix guarantees you don't have to worry about version conflicts, missing dependencies or even what state your OS is in.
  • We aim that every Ethereum application stored in the repository is constructed from its source, including all input dependencies. This approach guarantees the code's reproducibility and trustworthiness. Furthermore, with Nix, expert users can tweak and adjust the build process to any degree of detail as required.
  • We develop custom NixOS modules to streamline operations with applications such as Execution and Consensus clients (including performing backups). Moreover, we aim to introduce further abstractions that simplify everyday tasks, such as running a development environment effortlessly without needing docker.

This project is developed entirely in Nix Flakes (but it offers compatibility with legacy Nix thanks to flake-compat).

Documentation

We recommend you look at our documentation that shows how to use Ethereum.nix effectively.

Any PR improving documentation is welcome.

Development

We use devshell to have nice development environments. Below you can find the list of available commands:

🔨 Welcome to ethereum.nix

[Docs]

  docs  - Build and watch for docs

[Testing]

  tests - Build and run a test

[Tools]

  check - Checks the source tree
  fmt   - Format the source tree

[general commands]

  menu  - prints this menu

Requirements

To make the most of this repository, you should have the following installed:

After cloning this repository and entering inside, run direnv allow when prompted, and you will be met with the previous prompt.

Docs

To build the docs locally, run docs build. The output will be inside of ./result.

Run docs serve to serve the docs locally (after building them previously). You can edit the docs in ./docs.

Running tests

To run all tests, you can use check (alias for nix flake check); it will build all packages and run all tests.

You can use tests -h to execute a specific test, which will provide more information.

Formatting

You can manually format the source using the fmt command.

Contribute

We welcome any contribution or support to this project, but before doing so:

  • Make sure you have read the contribution guide for more details on how to submit a good PR (pull request).

In addition, you can always:

Acknowledgements

This project has been inspired by the awesome work of:

  • cosmos.nix by Informal Systems, which this repository takes inspiration from its README and several other places.

  • willruggiano on his work done in eth-nix repository that served as the initial kick-start for working on this project.