fix ssh-agent issue and added new file where pinned nixpkgs are specified

This commit is contained in:
Jonas Nick 2019-01-26 13:26:33 +00:00
parent ffe06ccf38
commit 61ee3a36f7
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
4 changed files with 13 additions and 20 deletions

View File

@ -105,7 +105,7 @@ FAQ
bitcoin-node> waiting for SSH... bitcoin-node> waiting for SSH...
Received disconnect from 10.1.1.200 port 22:2: Too many authentication failures 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 * Host *
PubkeyAuthentication no PubkeyAuthentication no
@ -159,5 +159,3 @@ Open VirtualBox
File -> Host Network Manager -> Create File -> Host Network Manager -> Create
This should create a hostadapter named vboxnet0 This should create a hostadapter named vboxnet0
``` ```

View File

@ -1,11 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
unstable-pkgs-git = builtins.fetchGit { nixpkgs-pinned = import ./nixpkgs-pinned.nix;
url = "https://github.com/nixos/nixpkgs-channels"; nixpkgs-unstable = import nixpkgs-pinned.nixpkgs-unstable { };
ref = "nixpkgs-unstable";
rev = "8349329617ffa70164c5a16b049c2ef5f59416bd";
};
unstable-pkgs = import unstable-pkgs-git { };
# Custom packages # Custom packages
nodeinfo = (import pkgs/nodeinfo.nix) { inherit pkgs; }; nodeinfo = (import pkgs/nodeinfo.nix) { inherit pkgs; };
@ -18,14 +14,14 @@ in {
disabledModules = [ "services/security/tor.nix" ]; disabledModules = [ "services/security/tor.nix" ];
imports = [ imports = [
./modules/nix-bitcoin.nix ./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: { nixpkgs.config.packageOverrides = pkgs: {
# Use bitcoin and clightning from unstable # Use bitcoin and clightning from unstable
bitcoin = unstable-pkgs.bitcoin.override { }; bitcoin = nixpkgs-unstable.bitcoin.override { };
altcoins.bitcoind = unstable-pkgs.altcoins.bitcoind.override { }; altcoins.bitcoind = nixpkgs-unstable.altcoins.bitcoind.override { };
clightning = unstable-pkgs.clightning.override { }; clightning = nixpkgs-unstable.clightning.override { };
# Add custom packages # Add custom packages
inherit nodeinfo; inherit nodeinfo;

View File

@ -7,7 +7,6 @@ if [ -e "$SECRETSFILE" ]; then
exit 1 exit 1
fi fi
echo Installing apg through nix-env
echo Write secrets to $SECRETSFILE echo Write secrets to $SECRETSFILE
{ {
echo \{ echo \{

View File

@ -1,10 +1,5 @@
let let
# Pin nixpkgs nixpkgs = (import ./nixpkgs-pinned.nix).nixpkgs;
nixpkgs = builtins.fetchGit {
url = "https://github.com/nixos/nixpkgs-channels";
ref = "nixos-18.09";
rev = "001b34abcb4d7f5cade707f7fd74fa27cbabb80b";
};
in in
with import nixpkgs { }; with import nixpkgs { };
@ -15,6 +10,11 @@ stdenv.mkDerivation rec {
shellHook = '' shellHook = ''
export NIX_PATH="nixpkgs=${nixpkgs}:." 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" figlet "nix-bitcoin"
./secrets/generate_secrets.sh ./secrets/generate_secrets.sh
''; '';