From f3877f8b0bdda1f8902ada4a83701ceebdee4003 Mon Sep 17 00:00:00 2001 From: Mike Heier Date: Sat, 12 Aug 2023 08:34:39 -0400 Subject: [PATCH] Updates --- flake.nix | 33 ++++++++++++++++----------------- module.nix | 2 +- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/flake.nix b/flake.nix index d8fc00e..79878a5 100644 --- a/flake.nix +++ b/flake.nix @@ -12,33 +12,32 @@ in flake-utils.lib.eachDefaultSystem (system: with nixpkgs.legacyPackages.${system}; { - imports = [ - ./module.nix - ]; - nixosModules = { # add moduleA from flakeA as an output # moduleA = flakeA.nixosModules.moduleA; default = import ./module.nix; }; - packages.${productName} = rustPlatform.buildRustPackage { - name = "${productName}"; - version = "${productVersion}"; + packages = + { + default = + rustPlatform.buildRustPackage { + name = "${productName}"; + version = "${productVersion}"; - src = lib.cleanSource ./.; + src = lib.cleanSource ./.; - cargoSha256 = "sha256-d84QNj9SIRUwtlsa9sdYKuYf0oCptdGm7pDs3eGTcBg="; + cargoSha256 = "sha256-d84QNj9SIRUwtlsa9sdYKuYf0oCptdGm7pDs3eGTcBg="; - preConfigure = '' - export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"; - ''; - nativeBuildInputs = [ cargo clang cmake ]; + preConfigure = '' + export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"; + ''; + nativeBuildInputs = [ cargo clang cmake ]; + }; + # default = "${productName}"; }; - - defaultPackage = self.packages.${system}.${productName}; - - devShell = mkShell { + + devShells.default = mkShell { inputsFrom = builtins.attrValues self.packages.${system}; shellHook = '' diff --git a/module.nix b/module.nix index 56fa374..e303bed 100644 --- a/module.nix +++ b/module.nix @@ -77,7 +77,7 @@ in { # electrs only uses the working directory for reading electrs.toml WorkingDirectory = cfg.dataDir; ExecStart = '' - ${config.pkgs.blockstream-electrs}/bin/electrs \ + ${pkgs.blockstream-electrs}/bin/electrs \ --log-filters=INFO \ --network=${bitcoind.makeNetworkName "bitcoin" "regtest"} \ --db-dir='${cfg.dataDir}' \