Update documentation

This commit is contained in:
nixbitcoin 2019-05-05 20:59:19 +02:00
parent c6667c346a
commit 8eef59ce72
No known key found for this signature in database
GPG Key ID: DD11F9AD5308B3BA
2 changed files with 73 additions and 5 deletions

View File

@ -132,14 +132,14 @@ This is borrowed from the [NixOS manual](https://nixos.org/nixos/manual/index.ht
1. Obtain latest NixOS. For example: 1. Obtain latest NixOS. For example:
``` ```
wget https://releases.nixos.org/nixos/18.09/nixos-18.09.2257.235487585ed/nixos-graphical-18.09.2257.235487585ed-x86_64-linux.iso wget https://releases.nixos.org/nixos/19.03/nixos-19.03.172538.7bb74e65365/nixos-minimal-19.03.172538.7bb74e65365-x86_64-linux.iso
``` ```
Alternatively you can build NixOS from source by following the instructions at https://nixos.org/nixos/manual/index.html#sec-building-cd. Alternatively you can build NixOS from source by following the instructions at https://nixos.org/nixos/manual/index.html#sec-building-cd.
2. Write NixOS iso to install media (USB/CD). For example: 2. Write NixOS iso to install media (USB/CD). For example:
``` ```
dd if=nixos-graphical-18.09.2257.235487585ed-x86_64-linux.iso of=/dev/sdX dd if=nixos-minimal-19.03.172538.7bb74e65365-x86_64-linux.iso of=/dev/sdX
``` ```
Replace /dev/sdX with the correct device name. You can find this using `sudo fdisk -l` Replace /dev/sdX with the correct device name. You can find this using `sudo fdisk -l`
@ -309,7 +309,7 @@ You can also build Nix from source by following the instructions at https://nixo
{ {
bitcoin-node = bitcoin-node =
{ config, pkgs, ... }: { config, pkgs, ... }:
{ deployment.targetHost = 1.2.3.4; { deployment.targetHost = "1.2.3.4";
}; };
} }
``` ```
@ -329,7 +329,7 @@ You can also build Nix from source by following the instructions at https://nixo
``` ```
nano hardware-configuration.nix nano hardware-configuration.nix
``` ```
Copy contents of NixOS machine's `hardware-configuration.nix` to file. Copy contents of NixOS machine's `/etc/nixos/hardware-configuration.nix` to file.
8. Add boot option to `hardware-configuration.nix` 8. Add boot option to `hardware-configuration.nix`
@ -339,7 +339,8 @@ You can also build Nix from source by following the instructions at https://nixo
``` ```
Option 2: Set grub device for Legacy Boot (MBR) Option 2: Set grub device for Legacy Boot (MBR)
``` ```
boot.loader.grub.device = "/dev/sda": ```
boot.loader.grub.device = "/dev/sda";
``` ```
9. Setup environment 9. Setup environment

View File

@ -148,3 +148,70 @@ Connect to nix-bitcoin node through ssh Tor Hidden Service
``` ```
6. Now you can run `nixops deploy -d bitcoin-node` and it will connect through the ssh tunnel you established in step iv. This also allows you to do more complex ssh setups that `nixops ssh` doesn't support. An example would be authenticating with [Trezor's ssh agent](https://github.com/romanz/trezor-agent), which provides extra security. 6. Now you can run `nixops deploy -d bitcoin-node` and it will connect through the ssh tunnel you established in step iv. This also allows you to do more complex ssh setups that `nixops ssh` doesn't support. An example would be authenticating with [Trezor's ssh agent](https://github.com/romanz/trezor-agent), which provides extra security.
Initialize a Trezor for Bitcoin Core's Hardware Wallet Integration
---
1. Enable Trezor in `configuration.nix`
Change
```
# services.hardware-wallets.trezor = true;
```
to
```
services.hardware-wallets.trezor = true;
```
2. Deploy new `configuration.nix`
```
nixops deploy -d bitcoin-node
```
3. Check that your nix-bitcoin node recognizes the Trezor
```
nixops ssh operator@bitcoin-node
lsusb
```
Should show something relating to your Trezor
3. Start the Trezor in bootloader mode
Trezor v1
```
Plug in the Trezor with both buttons depressed
```
Trezor v2
```
Start swiping your finger across the Trezor's touchscreen and plug in the USB cable when your finger is halfway through
```
4. Update your Trezor's firmware
```
trezorctl firmware-update
```
Follow the on-screen instructions
**Caution: This command _will_ wipe your device. If you already store Bitcoin on it, only do this with the recovery seed nearby.**
5. Set up your Trezor, if this is a fresh device
```
trezorctl reset-device -p
```
Follow the on-screen instructions
6. Find your Trezor
```
hwi enumerate
hwi -t trezor -d <path from previous command> promptpin
hwi -t trezor -d <path> sendpin <number positions for the PIN as displayed on your device's screen>
hwi enumerate
```
7. Follow Bitcoin Core's instructions on [Using Bitcoin Core with Hardware Wallets](https://github.com/bitcoin-core/HWI/blob/master/docs/bitcoin-core-usage.md) to use your Trezor with `bitcoin-cli` on your nix-bitcoin node