summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/poweredge/bitcoind.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/hosts/poweredge/bitcoind.nix b/hosts/poweredge/bitcoind.nix
new file mode 100644
index 0000000..715fb8a
--- /dev/null
+++ b/hosts/poweredge/bitcoind.nix
@@ -0,0 +1,35 @@
+{
+ containers.bitcoind = {
+ autoStart = true;
+ ephemeral = true;
+ privateNetwork = true;
+ extraVeths.vb-bitcoind = {
+ hostBridge = "br-lan0";
+ #localMacAddress = "02:00:00:00:00:04"; # TODO update to 26.05
+ };
+
+ # Host path
+ bindMounts = {
+ "/var/lib/bitcoind-main" = {
+ hostPath = "/media/ingens/bitcoin";
+ isReadOnly = false;
+ };
+ };
+
+ config = { lib, pkgs, config, ... }: let
+ btdPort = 8333;
+ in {
+ # Network
+ networking.interfaces.vb-bitcoind.useDHCP = true;
+ networking.firewall.allowedTCPPorts = [ btcPort ];
+
+ # Bitcoin
+ services.bitcoind."main" = {
+ enable = true;
+ port = btcPort;
+ };
+
+ system.stateVersion = "25.11";
+ };
+ };
+}