From aa90b254766f02304607936c5564773bf832cb6b Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Tue, 24 Oct 2023 09:32:24 -0600 Subject: [PATCH] handle package injection in module --- flake.nix | 2 +- nix/module.nix | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 15c9228e..675ccef1 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,7 @@ pkgs.callPackage ./nix/mev-rs.nix { inherit pkgs; crane = craneLib; }; in { - nixosModules.mev-rs = import ./nix/module.nix; + nixosModules.mev-rs = import ./nix/module.nix { inherit mev-rs; }; nixosModules.default = self.nixosModules.mev-rs; overlays.default = _:_: { diff --git a/nix/module.nix b/nix/module.nix index 8506ecb3..60e60d76 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -1,8 +1,9 @@ +pkg: { config, lib, pkgs, ... }: let cfg = config.services.mev-rs; - mev-rs = pkgs.mev-rs; + mev-rs = pkg.mev-rs pkgs.system; name = "mev-${cfg.enable}-rs";