2023-06-01 05:47:05 -07:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2024-06-28 19:55:15 -07:00
|
|
|
## Bitcoind
|
2024-08-26 16:48:18 -07:00
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
services.bitcoind = {
|
|
|
|
enable = true;
|
|
|
|
dataDir = "/run/media/Second_Drive/BTCEcoandBackup/Bitcoin_Node";
|
|
|
|
txindex = true;
|
|
|
|
tor.proxy = true;
|
|
|
|
disablewallet = true;
|
|
|
|
extraConfig = ''
|
|
|
|
peerbloomfilters=1
|
|
|
|
server=1
|
2023-11-20 21:35:28 -08:00
|
|
|
'';
|
|
|
|
};
|
2023-06-01 05:47:05 -07:00
|
|
|
|
2024-01-26 21:15:31 -08:00
|
|
|
systemd.services.bitcoind.wants = [ "network-online.target" ];
|
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
nix-bitcoin.onionServices.bitcoind.enable = true;
|
|
|
|
nix-bitcoin.onionServices.electrs.enable = true;
|
2023-11-20 21:30:51 -08:00
|
|
|
nix-bitcoin.onionServices.rtl.enable = true;
|
2023-06-01 05:47:05 -07:00
|
|
|
|
2024-06-28 19:55:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
## Electrs
|
2024-08-26 16:48:18 -07:00
|
|
|
|
2024-06-28 19:55:15 -07:00
|
|
|
services.electrs = {
|
|
|
|
enable = true;
|
|
|
|
tor.enforce = true;
|
|
|
|
dataDir = "/run/media/Second_Drive/BTCEcoandBackup/Electrs_Data";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## CLN
|
2024-08-26 16:48:18 -07:00
|
|
|
|
2024-06-28 19:55:15 -07:00
|
|
|
services.clightning = {
|
|
|
|
enable = true;
|
|
|
|
tor.proxy = true;
|
|
|
|
tor.enforce = true;
|
|
|
|
port = 9737;
|
2024-07-03 12:55:32 -07:00
|
|
|
extraConfig = ''
|
|
|
|
experimental-offers
|
|
|
|
'';
|
2024-06-28 19:55:15 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
nix-bitcoin.onionServices.clightning.public = true;
|
|
|
|
|
2024-07-31 12:14:47 -07:00
|
|
|
|
|
|
|
services.clightning.replication = {
|
|
|
|
enable = true;
|
|
|
|
local.directory = "/run/media/Second_Drive/BTCEcoandBackup/clightning_db_backup";
|
|
|
|
encrypt = false;
|
2024-07-31 12:24:16 -07:00
|
|
|
};
|
2024-07-31 12:14:47 -07:00
|
|
|
|
2024-06-28 19:55:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
## LND
|
2024-08-26 16:48:18 -07:00
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
services.lnd = {
|
|
|
|
enable = true;
|
2023-11-20 21:30:51 -08:00
|
|
|
tor.enforce = true;
|
2023-11-20 21:34:12 -08:00
|
|
|
tor.proxy = true;
|
2024-07-31 12:14:47 -07:00
|
|
|
extraConfig = ''
|
2024-05-12 16:02:58 -07:00
|
|
|
|
2024-07-31 12:14:47 -07:00
|
|
|
protocol.option-scid-alias=true
|
2024-05-12 16:02:58 -07:00
|
|
|
|
|
|
|
'';
|
2023-06-01 05:47:05 -07:00
|
|
|
};
|
|
|
|
|
2024-06-28 19:55:15 -07:00
|
|
|
nix-bitcoin.onionServices.lnd.public = true;
|
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
services.lightning-loop = {
|
2023-11-20 21:34:12 -08:00
|
|
|
enable = true;
|
|
|
|
tor.enforce = true;
|
|
|
|
tor.proxy = true;
|
2023-06-01 05:47:05 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
services.lightning-pool = {
|
|
|
|
enable = true;
|
2023-11-20 21:34:12 -08:00
|
|
|
tor.enforce = true;
|
|
|
|
tor.proxy = true;
|
2023-06-01 05:47:05 -07:00
|
|
|
};
|
2024-06-28 19:55:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
## RTL
|
2024-08-26 16:48:18 -07:00
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
services.rtl = {
|
|
|
|
enable = true;
|
2023-11-20 21:30:51 -08:00
|
|
|
tor.enforce = true;
|
2023-06-01 05:47:05 -07:00
|
|
|
port = 3050;
|
|
|
|
nightTheme = true;
|
|
|
|
nodes = {
|
2024-06-28 19:55:15 -07:00
|
|
|
clightning = {
|
|
|
|
enable = true;
|
2024-07-14 20:14:25 -07:00
|
|
|
extraConfig = {
|
|
|
|
Settings = {
|
|
|
|
enableOffers = true;
|
|
|
|
};
|
|
|
|
};
|
2024-06-28 19:55:15 -07:00
|
|
|
};
|
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
lnd = {
|
|
|
|
enable = true;
|
|
|
|
loop = true;
|
|
|
|
};
|
2024-06-28 19:55:15 -07:00
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
reverseOrder = true;
|
2024-06-28 19:55:15 -07:00
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-28 19:55:15 -07:00
|
|
|
## Lndconnect
|
2024-08-26 16:48:18 -07:00
|
|
|
|
2023-11-20 21:34:12 -08:00
|
|
|
services.lnd.lndconnect = {
|
|
|
|
enable = true;
|
|
|
|
onion = true;
|
|
|
|
};
|
2023-06-01 05:47:05 -07:00
|
|
|
|
2024-12-10 14:26:45 -08:00
|
|
|
services.clightning-rest = {
|
2023-06-01 05:47:05 -07:00
|
|
|
enable = true;
|
2024-12-10 14:26:45 -08:00
|
|
|
lndconnect = {
|
2024-06-28 19:55:15 -07:00
|
|
|
enable = true;
|
|
|
|
onion = true;
|
|
|
|
};
|
|
|
|
};
|
2023-06-01 05:47:05 -07:00
|
|
|
|
2024-06-28 19:55:15 -07:00
|
|
|
|
|
|
|
## BTCpay Server
|
2024-08-26 16:48:18 -07:00
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
services.btcpayserver = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2024-06-28 19:55:15 -07:00
|
|
|
services.btcpayserver.lightningBackend = "lnd";
|
|
|
|
|
|
|
|
|
|
|
|
## System
|
|
|
|
|
|
|
|
nix-bitcoin.generateSecrets = true;
|
|
|
|
|
2023-06-01 05:47:05 -07:00
|
|
|
nix-bitcoin.nodeinfo.enable = true;
|
|
|
|
|
|
|
|
nix-bitcoin.operator = {
|
|
|
|
enable = true;
|
|
|
|
name = "free";
|
|
|
|
};
|
2023-08-10 17:09:16 -07:00
|
|
|
|
|
|
|
nix-bitcoin.useVersionLockedPkgs = true;
|
2023-06-01 05:47:05 -07:00
|
|
|
|
|
|
|
}
|