Make Hosea the bitcoin node

This commit is contained in:
Greg Hellings
2024-08-23 14:08:01 -05:00
parent 560458380d
commit c70e098eb0
9 changed files with 177 additions and 41 deletions
-1
View File
@@ -34,7 +34,6 @@
networking.hostName = "genesis"; # Define your hostname.
environment.systemPackages = with pkgs; [
awscli2
btrfs-progs
create_ssl
step-ca
];
+47
View File
@@ -0,0 +1,47 @@
{ config, ... }:
let
ip = "100.68.203.1";
in {
nix-bitcoin = {
generateSecrets = true;
operator = {
enable = true;
name = "greg";
};
useVersionLockedPkgs = true; # Use the exact versions of packages from upstream
};
networking.firewall.allowedTCPPorts = with config.services; [
bitcoind.port
bitcoind.rpc.port
mempool.frontend.port
];
services = {
bitcoind = {
enable = true;
address = "0.0.0.0";
dataDir = "/chain/bitcoind";
listen = true;
rpc = {
address = ip;
allowip = [
"100.1.1.1/8"
];
};
};
clightning.enable = true;
electrs = {
enable = true;
address = ip;
};
mempool = {
enable = true;
frontend = {
enable = true;
address = ip;
};
};
};
}
+2 -2
View File
@@ -13,10 +13,10 @@ in
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./minio.nix
inputs.btc.nixosModules.default
./bitcoin.nix
];
# Bootloader
boot = {
loader = {
+5
View File
@@ -24,6 +24,11 @@
fsType = "vfat";
};
fileSystems."/chain" = {
device = "/dev/sda1";
fsType = "xfs";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
-32
View File
@@ -1,32 +0,0 @@
{ config, pkgs, ... }:
let
minioPort = 9000;
minioConsolePort = 9001;
in {
fileSystems."/proxy" = {
device = "/dev/sda1";
fsType = "btrfs";
};
networking.firewall.allowedTCPPorts = [
80
minioPort
minioConsolePort
];
age.secrets.minio.file = ../../secrets/minio.age;
services.minio = {
enable = true;
dataDir = [ "/proxy/minio" ];
rootCredentialsFile = config.age.secrets.minio.path;
browser = true;
};
greg.proxies."s3.thehellings.lan".target = "http://127.0.0.1:${toString minioPort}";
environment.systemPackages = with pkgs; [
minio-client
];
}
-1
View File
@@ -55,7 +55,6 @@
tailscale.enable = true;
};
environment.systemPackages = with pkgs; [
btrfs-progs
curl
gawk
git