Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flake: remove easyOverlay #442

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
{
imports = [
inputs.devshell.flakeModule
inputs.flake-parts.flakeModules.easyOverlay
inputs.flake-root.flakeModule
inputs.treefmt-nix.flakeModule
./mkdocs.nix
Expand Down
6 changes: 4 additions & 2 deletions modules/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
{self, ...}: {
imports = [
./testing.nix
];

# create a default nixos module which mixes in all modules
flake.nixosModules.default = {
flake.nixosModules.default = {pkgs, ...}: {
imports = [
./backup
./erigon
Expand All @@ -18,5 +18,7 @@
./prysm-validator
./restore
];

_module.args.ethereum-nix = self.packages.${pkgs.system};
};
}
4 changes: 2 additions & 2 deletions modules/mev-boost/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
config,
lib,
pkgs,
ethereum-nix,
...
}: let
modulesLib = import ../lib.nix lib;
Expand All @@ -15,7 +15,7 @@
eachMevBoost = config.services.ethereum.mev-boost;
in {
###### interface
inherit (import ./options.nix {inherit lib pkgs;}) options;
inherit (import ./options.nix {inherit lib ethereum-nix;}) options;

###### implementation

Expand Down
6 changes: 3 additions & 3 deletions modules/mev-boost/options.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
lib,
pkgs,
ethereum-nix,
...
}: let
args = import ./args.nix lib;
Expand All @@ -18,8 +18,8 @@
};

package = mkOption {
default = pkgs.mev-boost;
defaultText = literalExpression "pkgs.mev-boost";
default = ethereum-nix.mev-boost;
defaultText = literalExpression "ethereum-nix.mev-boost";
type = types.package;
description = mdDoc "Package to use for mev-boost binary";
};
Expand Down
4 changes: 2 additions & 2 deletions modules/nethermind/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
config,
lib,
pkgs,
ethereum-nix,
...
}: let
inherit
Expand Down Expand Up @@ -34,7 +34,7 @@
eachNethermind = config.services.ethereum.nethermind;
in {
###### interface
inherit (import ./options.nix {inherit lib pkgs;}) options;
inherit (import ./options.nix {inherit lib ethereum-nix;}) options;

###### implementation

Expand Down
4 changes: 2 additions & 2 deletions modules/nethermind/options.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
lib,
pkgs,
ethereum-nix,
...
}: let
args = import ./args.nix lib;
Expand All @@ -11,7 +11,7 @@

package = mkOption {
type = types.package;
default = pkgs.nethermind;
default = ethereum-nix.nethermind;
defaultText = literalExpression "pkgs.nethermind";
description = mdDoc "Package to use as Nethermind.";
};
Expand Down
4 changes: 2 additions & 2 deletions modules/prysm-validator/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
config,
lib,
pkgs,
ethereum-nix,
...
}: let
modulesLib = import ../lib.nix lib;
Expand All @@ -16,7 +16,7 @@
eachValidator = config.services.ethereum.prysm-validator;
in {
###### interface
inherit (import ./options.nix {inherit lib pkgs;}) options;
inherit (import ./options.nix {inherit lib ethereum-nix;}) options;

###### implementation

Expand Down
5 changes: 3 additions & 2 deletions modules/prysm-validator/default.test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

module = {
pkgs,
ethereum-nix,
lib,
...
}:
Expand All @@ -18,7 +19,7 @@
mnemonic="tooth moon mad fun romance athlete envelope next mix divert tip top symbol resemble stock family melody desk sheriff drift bargain need jaguar method"
echo $mnemonic > /tmp/wallet/mnemonic.txt

${pkgs.prysm}/bin/validator wallet create \
${ethereum-nix.prysm}/bin/validator wallet create \
--accept-terms-of-use \
--goerli \
--keymanager-kind="direct" \
Expand All @@ -38,7 +39,7 @@
writableStore = true;
};

environment.systemPackages = [wallet-generator pkgs.ethdo pkgs.prysm];
environment.systemPackages = [wallet-generator ethereum-nix.ethdo ethereum-nix.prysm];

services.ethereum.prysm-validator.test = {
enable = true;
Expand Down
6 changes: 3 additions & 3 deletions modules/prysm-validator/options.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
lib,
pkgs,
ethereum-nix,
...
}: let
args = import ./args.nix lib;
Expand All @@ -18,8 +18,8 @@
};

package = mkOption {
default = pkgs.prysm;
defaultText = literalExpression "pkgs.prysm";
default = ethereum-nix.prysm;
defaultText = literalExpression "ethereum-nix.prysm";
type = types.package;
description = mdDoc "Package to use for Prysm binary";
};
Expand Down
16 changes: 4 additions & 12 deletions modules/testing.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
{
self,
inputs,
...
}: {
perSystem = {
lib,
config,
system,
pkgs,
...
}: let
# create a custom nixpkgs with our flake packages available
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
self.overlays.default
];
};
in {
}: {
########################################
## Interface
########################################
Expand Down Expand Up @@ -57,8 +49,8 @@
# speed up evaluation by skipping docs
defaults.documentation.enable = lib.mkDefault false;

# make self available in test modules and our custom pkgs
node.specialArgs = {inherit self pkgs;};
# make self available in test modules
node.specialArgs = {inherit self;};

# import all of our flake nixos modules by default
defaults.imports = [
Expand Down
2 changes: 0 additions & 2 deletions packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,5 @@
tx-fuzz.bin = "tx-fuzz";
zcli.bin = "zcli";
};

overlayAttrs = self'.packages;
};
}