diff --git a/README.md b/README.md index a6614e5..86ed162 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ FAQ bitcoin-node> waiting for SSH... Received disconnect from 10.1.1.200 port 22:2: Too many authentication failures ``` - * **A:** Somehow ssh-agent and nixops don't play well together (see also https://github.com/NixOS/nixops/issues/256), if you have a few keys already added to your ssh-agent. Killing and restarting the ssh-agent should fix the problem. Also make sure you don't have something like + * **A:** Somehow ssh-agent and nixops don't play well together. Try killing the ssh-agent. Also make sure you don't have something like ``` Host * PubkeyAuthentication no @@ -159,5 +159,3 @@ Open VirtualBox File -> Host Network Manager -> Create This should create a hostadapter named vboxnet0 ``` - - diff --git a/nix-bitcoin.nix b/nix-bitcoin.nix index f95c696..63f7205 100644 --- a/nix-bitcoin.nix +++ b/nix-bitcoin.nix @@ -1,11 +1,7 @@ { config, pkgs, ... }: let - unstable-pkgs-git = builtins.fetchGit { - url = "https://github.com/nixos/nixpkgs-channels"; - ref = "nixpkgs-unstable"; - rev = "8349329617ffa70164c5a16b049c2ef5f59416bd"; - }; - unstable-pkgs = import unstable-pkgs-git { }; + nixpkgs-pinned = import ./nixpkgs-pinned.nix; + nixpkgs-unstable = import nixpkgs-pinned.nixpkgs-unstable { }; # Custom packages nodeinfo = (import pkgs/nodeinfo.nix) { inherit pkgs; }; @@ -18,14 +14,14 @@ in { disabledModules = [ "services/security/tor.nix" ]; imports = [ ./modules/nix-bitcoin.nix - (unstable-pkgs-git + "/nixos/modules/services/security/tor.nix") + (nixpkgs-pinned.nixpkgs-unstable + "/nixos/modules/services/security/tor.nix") ]; nixpkgs.config.packageOverrides = pkgs: { # Use bitcoin and clightning from unstable - bitcoin = unstable-pkgs.bitcoin.override { }; - altcoins.bitcoind = unstable-pkgs.altcoins.bitcoind.override { }; - clightning = unstable-pkgs.clightning.override { }; + bitcoin = nixpkgs-unstable.bitcoin.override { }; + altcoins.bitcoind = nixpkgs-unstable.altcoins.bitcoind.override { }; + clightning = nixpkgs-unstable.clightning.override { }; # Add custom packages inherit nodeinfo; diff --git a/secrets/generate_secrets.sh b/secrets/generate_secrets.sh index b25d47b..d2cd607 100755 --- a/secrets/generate_secrets.sh +++ b/secrets/generate_secrets.sh @@ -7,7 +7,6 @@ if [ -e "$SECRETSFILE" ]; then exit 1 fi -echo Installing apg through nix-env echo Write secrets to $SECRETSFILE { echo \{ diff --git a/shell.nix b/shell.nix index 5c9efe3..11f4d93 100644 --- a/shell.nix +++ b/shell.nix @@ -1,10 +1,5 @@ let - # Pin nixpkgs - nixpkgs = builtins.fetchGit { - url = "https://github.com/nixos/nixpkgs-channels"; - ref = "nixos-18.09"; - rev = "001b34abcb4d7f5cade707f7fd74fa27cbabb80b"; - }; + nixpkgs = (import ./nixpkgs-pinned.nix).nixpkgs; in with import nixpkgs { }; @@ -15,6 +10,11 @@ stdenv.mkDerivation rec { shellHook = '' export NIX_PATH="nixpkgs=${nixpkgs}:." + # ssh-agent and nixops don't play well together (see + # https://github.com/NixOS/nixops/issues/256). I'm getting `Received disconnect + # from 10.1.1.200 port 22:2: Too many authentication failures` if I have a few + # keys already added to my ssh-agent. + export SSH_AUTH_SOCK="" figlet "nix-bitcoin" ./secrets/generate_secrets.sh '';