Merge #254: shell.nix: fix failing generate-secrets

d2dbad256f shell.nix: fix failing generate-secrets (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK d2dbad256f

Tree-SHA512: 7cf29fa9a658d12ad3aec00cc8f38660623e00950eebad92cef8ec4a28180eebfd0dfb1a56cdcd15389f31c4ce15302c241ac9aaba11267b8da0cd842a5701e2
This commit is contained in:
Jonas Nick 2020-10-20 07:41:34 +00:00
commit 36935291ff
No known key found for this signature in database
GPG Key ID: 4861DBF262123605

View File

@ -20,10 +20,12 @@ with nixpkgs;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "nix-bitcoin-environment"; name = "nix-bitcoin-environment";
buildInputs = [ nix-bitcoin.nixops19_09 nix-bitcoin.extra-container figlet ]; path = lib.makeBinPath [ nix-bitcoin.nixops19_09 nix-bitcoin.extra-container figlet ];
shellHook = '' shellHook = ''
export NIX_PATH="nixpkgs=${nixpkgs-path}:nix-bitcoin=${toString nix-bitcoin-path}:." export NIX_PATH="nixpkgs=${nixpkgs-path}:nix-bitcoin=${toString nix-bitcoin-path}:."
export PATH="${path}''${PATH:+:}$PATH"
alias fetch-release="${toString nix-bitcoin-path}/helper/fetch-release" alias fetch-release="${toString nix-bitcoin-path}/helper/fetch-release"
# ssh-agent and nixops don't play well together (see # ssh-agent and nixops don't play well together (see
@ -33,7 +35,7 @@ stdenv.mkDerivation rec {
export SSH_AUTH_SOCK="" export SSH_AUTH_SOCK=""
figlet "nix-bitcoin" figlet "nix-bitcoin"
(mkdir -p secrets; cd secrets; ${nix-bitcoin.generate-secrets}) (mkdir -p secrets; cd secrets; env -i ${nix-bitcoin.generate-secrets})
# Don't run this hook when another nix-shell is run inside this shell # Don't run this hook when another nix-shell is run inside this shell
unset shellHook unset shellHook