refactor: collapse fakewallet/regtest wrappers into single dev CLI
Replaces the two parallel scripts (fakewallet.sh, regtest.sh) with one
modules/dev-env/scripts/dev.sh — `dev up [--fakewallet|--regtest]`,
plus `down|logs|shell`. Default mode is fakewallet (no docker, no
chains, instant), matching what the prior scaffold did with two scripts
but giving consumers one command and one verb-set to learn.
Drops the now-redundant `lnbits.backend` enum and `features.fakewallet`
option from core.nix. Backend selection is the dev CLI's runtime
concern; a NixOS-level option would be a second knob that can disagree
with the CLI flag at runtime. `lnbits.{host,port}` stay (bind addr,
useful to docs and any later service path). `features.regtest` stays
(gates docker engine installation — consumers who'll never use the
regtest mode shouldn't pay for the container engine).
Strips modules/lnbits.nix entirely. The dev CLI runs lnbits ad-hoc; if
a NixOS-managed lnbits service becomes a real ask later, re-add a
focused module then.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bbaa80d8a3
commit
94a7c5f97c
7 changed files with 66 additions and 157 deletions
|
|
@ -121,8 +121,9 @@ in
|
|||
enable = mkEnableOption ''
|
||||
Bitcoin/Lightning regtest docker stack. Wraps an upstream
|
||||
fork of `lnbits/legend-regtest-enviroment` (LND + CLN +
|
||||
Eclair + bitcoind + electrs). Implies a container engine —
|
||||
the substantive pass will gate this on a containers feature
|
||||
Eclair + bitcoind + electrs). Brought up via
|
||||
`dev up --regtest`. Implies a container engine — the
|
||||
substantive pass will gate this on a containers feature
|
||||
'';
|
||||
|
||||
repoUrl = mkOption {
|
||||
|
|
@ -136,15 +137,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
fakewallet = {
|
||||
enable = mkEnableOption ''
|
||||
FakeWallet dev mode helpers. Installs the symmetric `fakewallet`
|
||||
wrapper script (a no-op for parity with `regtest up`) so the
|
||||
dev experience is identical whether you're on the default
|
||||
FakeWallet path or the full regtest stack
|
||||
'';
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = mkEnableOption "declarative tmux session launcher";
|
||||
|
||||
|
|
|
|||
Reference in a new issue