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

shell.nix: fix failing generate-secrets #254

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ with nixpkgs;
stdenv.mkDerivation rec {
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 = ''
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"

# ssh-agent and nixops don't play well together (see
Expand All @@ -33,7 +35,7 @@ stdenv.mkDerivation rec {
export SSH_AUTH_SOCK=""

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
unset shellHook
Expand Down