From 5d69895ff4846f9a138e3f017dfde95133ac59ad Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Fri, 28 Jun 2024 19:55:15 -0700 Subject: [PATCH] Added CLN --- custom-add-ons.md | 17 +++++++-- modules/bitcoinecosystem.nix | 68 ++++++++++++++++++++++++++++++------ 2 files changed, 72 insertions(+), 13 deletions(-) diff --git a/custom-add-ons.md b/custom-add-ons.md index 0dfcf41..fe726dc 100644 --- a/custom-add-ons.md +++ b/custom-add-ons.md @@ -2,14 +2,19 @@ Add-ons are extra features you can have installed before your Sovran Pro is shipped to you. -There is Jitsi Meet that is available to be added on. Jitsi is a video conference software in which you send a web link to a video conference and anyone can join. + +1. There is Jitsi Meet that is available to be added on. Jitsi is a video conference software in which you send a web link to a video conference and anyone can join. + https://jitsi.org -There is also Bitcoin Knots Node available to be added instead of the regular Bitcoin Node. Bitcoin Knots allows a special filter to block unwanted, unusable, erroneous, yet harmless data on the Bitcoin Block chain. + +2. There is also Bitcoin Knots Node available to be added instead of the regular Bitcoin Node. Bitcoin Knots allows a special filter to block unwanted, unusable, erroneous, yet harmless data on the Bitcoin Block chain. https://bitcoinknots.org +3. By default Sovran_SystemsOS runs LND as the default Lightning node software for BTCpayserver. You are now able to run CLN asthe backend to BTCpayserver instead of LND. + The code will be installed in the `custom.nix` file. @@ -115,3 +120,11 @@ services.bitcoind.package = pkgs.bitcoind-knots; ``` + +The code for CLN for BTCpayserver backend is as follows: + +```nix +services.btcpayserver.lightningBackend = mkForce "clightning"; + +``` + diff --git a/modules/bitcoinecosystem.nix b/modules/bitcoinecosystem.nix index 23b5a52..a5b71f3 100755 --- a/modules/bitcoinecosystem.nix +++ b/modules/bitcoinecosystem.nix @@ -1,8 +1,8 @@ { config, pkgs, lib, ... }: { - nix-bitcoin.generateSecrets = true; + ## Bitcoind services.bitcoind = { enable = true; dataDir = "/run/media/Second_Drive/BTCEcoandBackup/Bitcoin_Node"; @@ -21,6 +21,30 @@ nix-bitcoin.onionServices.electrs.enable = true; nix-bitcoin.onionServices.rtl.enable = true; + + + ## Electrs + services.electrs = { + enable = true; + tor.enforce = true; + dataDir = "/run/media/Second_Drive/BTCEcoandBackup/Electrs_Data"; + }; + + + + ## CLN + services.clightning = { + enable = true; + tor.proxy = true; + tor.enforce = true; + port = 9737; + }; + + nix-bitcoin.onionServices.clightning.public = true; + + + + ## LND services.lnd = { enable = true; tor.enforce = true; @@ -30,9 +54,10 @@ protocol.option-scid-alias=true ''; - }; + nix-bitcoin.onionServices.lnd.public = true; + services.lightning-loop = { enable = true; tor.enforce = true; @@ -45,45 +70,66 @@ tor.proxy = true; }; + services.charge-lnd.enable = true; + + + + ## RTL services.rtl = { enable = true; tor.enforce = true; port = 3050; nightTheme = true; nodes = { + clightning = { + enable = true; + }; + lnd = { enable = true; loop = true; }; + reverseOrder = true; + }; }; + + ## Mempool services.mempool.enable = true; nix-bitcoin.onionServices.mempool-frontend.enable = true; - nix-bitcoin.onionServices.lnd.public = true; + + ## Lndconnect services.lnd.lndconnect = { enable = true; onion = true; }; - - services.charge-lnd.enable = true; - services.btcpayserver.lightningBackend = "lnd"; - - services.electrs = { + services.clightning-rest = { enable = true; - tor.enforce = true; - dataDir = "/run/media/Second_Drive/BTCEcoandBackup/Electrs_Data"; - }; + lndconnect = { + enable = true; + onion = true; + }; + }; + + ## BTCpay Server services.btcpayserver = { enable = true; }; + services.btcpayserver.lightningBackend = "lnd"; + + + ## System + + nix-bitcoin.generateSecrets = true; + nix-bitcoin.nodeinfo.enable = true; nix-bitcoin.operator = {