feat(packs): bitcoin, lnbits and aiolabs lightning packs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
095f2ccf29
commit
2d7c936d80
3 changed files with 85 additions and 0 deletions
14
modules/packs/aiolabs.nix
Normal file
14
modules/packs/aiolabs.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# aiolabs pack — the opinionated aiolabs project list + deploy targets +
|
||||
# tmux sessions, layered on the lnbits dev environment.
|
||||
#
|
||||
# Imports the aiolabs preset, which is gated on omni.packs.aiolabs.enable
|
||||
# (inert until enabled) and pulls in the lnbits pack. The project/deploy/
|
||||
# tmux definitions live in the preset; this file declares the toggle and
|
||||
# wires it in.
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [ ../dev-env/presets/aiolabs.nix ];
|
||||
|
||||
options.omni.packs.aiolabs.enable =
|
||||
lib.mkEnableOption "aiolabs project preset (projects, deploy targets, tmux) on top of lnbits";
|
||||
}
|
||||
46
modules/packs/bitcoin.nix
Normal file
46
modules/packs/bitcoin.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# bitcoin pack — a real Bitcoin/Lightning node via nix-bitcoin.
|
||||
#
|
||||
# STANDALONE-IMPORTABLE and DISABLED BY DEFAULT. Imports only
|
||||
# nix-bitcoin.nixosModules.default (NOT the secure-node/hardened presets,
|
||||
# which are server-oriented and hostile to a desktop). When enabled it
|
||||
# runs bitcoind + clightning with auto-generated secrets and grants the
|
||||
# operator account CLI access.
|
||||
#
|
||||
# Note: nix-bitcoin's default module replaces nixpkgs' services.bitcoind
|
||||
# and claims that namespace (disabledModules). omni sets no
|
||||
# services.bitcoind config, so importing it inert is closure-neutral.
|
||||
{ config, lib, inputs, ... }:
|
||||
let
|
||||
cfg = config.omni.packs.bitcoin;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.nix-bitcoin.nixosModules.default ];
|
||||
|
||||
options.omni.packs.bitcoin = {
|
||||
enable = lib.mkEnableOption "Bitcoin/Lightning node via nix-bitcoin (bitcoind + clightning)";
|
||||
|
||||
operatorName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "operator";
|
||||
description = ''
|
||||
Operator account granted CLI access to the node. Set to your login
|
||||
user. Kept omni-independent (a plain default, not
|
||||
config.omni.user) so this pack stays standalone-importable.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# generateSecrets auto-writes node secrets at activation (never during
|
||||
# build/VM, so it can't affect the build-only gates). Simplest secrets
|
||||
# path for a workstation; sops integration is a future option.
|
||||
nix-bitcoin.generateSecrets = true;
|
||||
nix-bitcoin.operator = {
|
||||
enable = true;
|
||||
name = cfg.operatorName;
|
||||
};
|
||||
|
||||
services.bitcoind.enable = true;
|
||||
services.clightning.enable = true;
|
||||
};
|
||||
}
|
||||
25
modules/packs/lnbits.nix
Normal file
25
modules/packs/lnbits.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# lnbits pack — the LNbits multi-project dev environment.
|
||||
#
|
||||
# STANDALONE-IMPORTABLE: imports the dev-env module and enables it, so a
|
||||
# third party importing only `nixosModules.lnbits` onto their own NixOS
|
||||
# gets the full dev environment (worktrees, regtest, tmux, pre-commit
|
||||
# hook) without needing omni core. dev-env was decoupled from omni.*
|
||||
# in an earlier commit precisely to make this possible. (This is what lets
|
||||
# the standalone lnbits-sensei scaffold be retired — see P8.)
|
||||
#
|
||||
# Configure the environment via the standard dev-env.* options
|
||||
# (dev-env.user, dev-env.root, dev-env.projects, …).
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.omni.packs.lnbits;
|
||||
in
|
||||
{
|
||||
imports = [ ../dev-env ];
|
||||
|
||||
options.omni.packs.lnbits.enable =
|
||||
lib.mkEnableOption "LNbits dev-environment pack (worktrees, regtest, tmux)";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
dev-env.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue