Skip to content

nix-community/ethereum.nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Available Tools

Execution Clients

besu - Besu is an Apache 2.0 licensed, MainNet compatible, Ethereum client written in Java
erigon - Ethereum node implementation focused on scalability and modularity
geth - Official golang implementation of the Ethereum protocol
nethermind - Our flagship Ethereum client for Linux, Windows, and macOS—full and actively developed
reth - Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust

Consensus Clients

lighthouse - Ethereum consensus client in Rust
prysm - Go implementation of Ethereum proof of stake
teku - Java Implementation of the Ethereum 2.0 Beacon Chain

Validators

charon - Charon (pronounced 'kharon') is a Proof of Stake Ethereum Distributed Validator Client
dirk - An Ethereum 2 distributed remote keymanager, focused on security and long-term performance of signing operations
vouch - An Ethereum 2 multi-node validator client
web3signer - Web3Signer is an open-source signing service capable of signing on multiple platforms (Ethereum1 and 2, Filecoin) using private keys stored in an external vault, or encrypted on a disk

MEV

mev-boost - MEV-Boost allows proof-of-stake Ethereum consensus clients to source blocks from a competitive builder marketplace
mev-boost-relay - MEV-Boost Relay for Ethereum proposer/builder separation (PBS)

SSV

ssv-dkg - The ssv-dkg tool enable operators to participate in ceremonies to generate distributed validator keys for Ethereum stakers.
ssvnode - Secret-Shared-Validator(SSV) for ethereum staking

Development Tools

eth2-testnet-genesis - Create a genesis state for an Eth2 testnet
eth2-val-tools - Some experimental tools to manage validators
ethdo - A command-line tool for managing common tasks in Ethereum 2
ethereal - A command-line tool for managing common tasks in Ethereum
heimdall - A toolkit for EVM bytecode analysis
kurtosis - CLI for Kurtosis, a framework for building and running distributed systems
sedge - A one-click setup tool for PoS network/chain validators and nodes.
tx-fuzz - TX-Fuzz is a package containing helpful functions to create random transactions
zcli - Eth2 CLI debugging tool

Utilities

blutgang - the wd40 of ethereum load balancers
rotki-bin - An open source portfolio tracking tool that respects your privacy

Uncategorized

formatter - One CLI to format the code tree
nimbus - Nimbus is a lightweight client for the Ethereum consensus layer

LSP

solidity-language-server - Solidity language server by Nomic Foundation

Staking

eigenlayer - Utility manages core operator functionalities like local key management, operator registration and updates
ethstaker-deposit-cli - Secure key generation for deposits (ethstaker fork)
rocketpool - Rocket Pool CLI
rocketpoold - Rocket Pool Daemon
staking-deposit-cli - Secure key generation for deposits

Installation

Using Nix Flakes (Recommended)

Add to your system configuration:

{
  inputs = {
    ethereum.url = "github:nix-community/ethereum.nix";
  };

  # In your system packages:
  environment.systemPackages = with inputs.ethereum.packages.${pkgs.stdenv.hostPlatform.system}; [
    geth
    lighthouse
    reth
    mev-boost
    # ... other tools
  ];
}

Using Overlay

Alternatively, use the overlay to access packages under the ethereum namespace:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    ethereum.url = "github:nix-community/ethereum.nix";
  };

  outputs = { nixpkgs, ethereum, ... }: {
    # NixOS configuration
    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [{
        nixpkgs.overlays = [ ethereum.overlays.default ];
        environment.systemPackages = [
          pkgs.ethereum.geth
          pkgs.ethereum.lighthouse
          pkgs.ethereum.prysm
        ];
      }];
    };
  };
}

Try Without Installing

# Try Geth (Execution Client)
nix run github:nix-community/ethereum.nix#geth -- --help

# Try Lighthouse (Consensus Client)
nix run github:nix-community/ethereum.nix#lighthouse -- --help

# Try Reth (Execution Client)
nix run github:nix-community/ethereum.nix#reth -- --help

# Try MEV-Boost
nix run github:nix-community/ethereum.nix#mev-boost -- --help

# etc...

Development

We use devshell to have nice development environments. Otherwise:

nix develop

Building Packages

# Build a specific package
nix build .#claude-code
nix build .#opencode
nix build .#qwen-code
# etc...

Running checks

To run all tests:

nix flake check

Formatting

You can manually format the source:

nix fmt

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.

License

Individual tools are licensed under their respective licenses.

The Nix packaging code in this repository is licensed under MIT.

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published

Contributors 43