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
Generated
+118 -5
View File
@@ -23,6 +23,28 @@
"type": "github" "type": "github"
} }
}, },
"btc": {
"inputs": {
"extra-container": "extra-container",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
},
"locked": {
"lastModified": 1723533469,
"narHash": "sha256-8gSsZpYmOzwFRaLIX0OMBvV/+SATmu/O9QXkDgsZlIg=",
"owner": "fort-nix",
"repo": "nix-bitcoin",
"rev": "6e208d6a7b554be592167f6ecad9b16c0abf96d7",
"type": "github"
},
"original": {
"owner": "fort-nix",
"ref": "release",
"repo": "nix-bitcoin",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -108,6 +130,31 @@
"type": "github" "type": "github"
} }
}, },
"extra-container": {
"inputs": {
"flake-utils": [
"btc",
"flake-utils"
],
"nixpkgs": [
"btc",
"nixpkgs"
]
},
"locked": {
"lastModified": 1722175938,
"narHash": "sha256-HKyB4HD+NdX3T233bY31hm76v3/tdQBNeLLvopKbZeY=",
"owner": "erikarvstedt",
"repo": "extra-container",
"rev": "37e7207ac9f857eedb58b208b9dc91cd6b24e651",
"type": "github"
},
"original": {
"owner": "erikarvstedt",
"repo": "extra-container",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@@ -264,6 +311,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@@ -545,7 +610,39 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1723221148,
"narHash": "sha256-7pjpeQlZUNQ4eeVntytU3jkw9dFK3k1Htgk2iuXjaD8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "154bcb95ad51bc257c2ce4043a725de6ca700ef6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1723282977,
"narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1723175592, "lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
@@ -601,7 +698,7 @@
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
@@ -627,7 +724,7 @@
"git-hooks": "git-hooks_2", "git-hooks": "git-hooks_2",
"home-manager": "home-manager_3", "home-manager": "home-manager_3",
"nix-darwin": "nix-darwin_2", "nix-darwin": "nix-darwin_2",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"nuschtosSearch": "nuschtosSearch", "nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
@@ -663,7 +760,7 @@
}, },
"nuschtosSearch": { "nuschtosSearch": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"nixpkgs": [ "nixpkgs": [
"nixvimunstable", "nixvimunstable",
"nixpkgs" "nixpkgs"
@@ -686,8 +783,9 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"btc": "btc",
"darwin": "darwin_2", "darwin": "darwin_2",
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"hm": "hm", "hm": "hm",
"hmunstable": "hmunstable", "hmunstable": "hmunstable",
"nix23_05": "nix23_05", "nix23_05": "nix23_05",
@@ -759,6 +857,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -804,7 +917,7 @@
"wsl": { "wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_4",
"nixpkgs": [ "nixpkgs": [
"nixunstable" "nixunstable"
] ]
+3
View File
@@ -9,6 +9,9 @@
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixunstable"; inputs.nixpkgs.follows = "nixunstable";
}; };
btc = {
url = "github:fort-nix/nix-bitcoin/release";
};
darwin = { darwin = {
url = "github:lnl7/nix-darwin/master"; url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixunstable"; inputs.nixpkgs.follows = "nixunstable";
-1
View File
@@ -34,7 +34,6 @@
networking.hostName = "genesis"; # Define your hostname. networking.hostName = "genesis"; # Define your hostname.
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
awscli2 awscli2
btrfs-progs
create_ssl create_ssl
step-ca 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 = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./minio.nix inputs.btc.nixosModules.default
./bitcoin.nix
]; ];
# Bootloader # Bootloader
boot = { boot = {
loader = { loader = {
+5
View File
@@ -24,6 +24,11 @@
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/chain" = {
device = "/dev/sda1";
fsType = "xfs";
};
swapDevices = [ ]; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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; tailscale.enable = true;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
btrfs-progs
curl curl
gawk gawk
git git
+2
View File
@@ -27,11 +27,13 @@ in {
environment.sessionVariables.MOZ_ENABLE_WAYLAND = "0"; environment.sessionVariables.MOZ_ENABLE_WAYLAND = "0";
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
btrfs-progs
coreutils-full coreutils-full
efibootmgr efibootmgr
psmisc psmisc
lshw lshw
usbutils usbutils
xfsprogs
]; ];
system.stateVersion = "24.05"; system.stateVersion = "24.05";