Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/cln.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
network=regtest
log-level=debug
bitcoin-rpcuser=username
bitcoin-rpcpassword=password
bitcoin-rpcconnect=localhost
bitcoin-rpcport=18443
24 changes: 12 additions & 12 deletions devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1746101600,
"lastModified": 1749632886,
"owner": "cachix",
"repo": "devenv",
"rev": "86dbb4b05ac23147bcc468e7ed77567bae11e418",
"rev": "0d39abfbac9ac9f421f2c43453af4ebc13227521",
"type": "github"
},
"original": {
Expand All @@ -24,10 +24,10 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1746081462,
"lastModified": 1749623906,
"owner": "nix-community",
"repo": "fenix",
"rev": "e3be528e4f03538852ba49b413ec4ac843edeb60",
"rev": "873cccc628f5e39407e319e6711f3b7d6d1f15cc",
"type": "github"
},
"original": {
Expand All @@ -39,10 +39,10 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"lastModified": 1747046372,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
Expand All @@ -60,10 +60,10 @@
]
},
"locked": {
"lastModified": 1742649964,
"lastModified": 1747372754,
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
"type": "github"
},
"original": {
Expand Down Expand Up @@ -94,10 +94,10 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1733477122,
"lastModified": 1746807397,
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857",
"rev": "c5208b594838ea8e6cca5997fbf784b7cca1ca90",
"type": "github"
},
"original": {
Expand All @@ -121,10 +121,10 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1746024678,
"lastModified": 1749558764,
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "5d66d45005fef79751294419ab9a9fa304dfdf5c",
"rev": "9c3476d225ccc90c081280c2a20e9f7d8a200325",
"type": "github"
},
"original": {
Expand Down
15 changes: 15 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
};

bitcoindDataDir = "${config.devenv.root}/.devenv/state/bitcoind";
lightningClnDataDir = "${config.devenv.root}/.devenv/state/cln";

poolConfig = builtins.fromTOML (builtins.readFile ./config/pool.toml);
minerConfig = builtins.fromTOML (builtins.readFile ./config/miner.toml);
Expand Down Expand Up @@ -43,6 +44,7 @@ in {
pkgs.just
pkgs.coreutils # Provides stdbuf for disabling output buffering
pkgs.redis
pkgs.clightning # Lightning - CLN
]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin [pkgs.darwin.apple_sdk.frameworks.Security];

Expand Down Expand Up @@ -98,6 +100,19 @@ in {
bitcoind -datadir=${bitcoindDataDir} -conf=${config.devenv.root}/bitcoin.conf
'' "bitcoind-regtest.log";
};
# Lightning node -- CLN
lightning-cln = {
exec = withLogging ''
mkdir -p ${lightningClnDataDir}
echo "Waiting for bitcoind..."
while ! nc -z localhost 18443; do
sleep 1
done
echo "bitcoind is up. Starting lightning..."
lightningd --version
lightningd --conf=${config.devenv.root}/config/cln.conf --lightning-dir=${lightningClnDataDir}
'' "cln.log";
};
miner = {
exec = withLogging ''
echo "Waiting for proxy..."
Expand Down
Loading