chore: scaffold dev-env module (options + config + lib stubs)
default.nix composes the three sub-modules. options.nix declares the public surface (projects, regtest, fakewallet, tmux) so consumers can wire values today even though config.nix is empty. lib.nix reserves dev-env-scoped helpers separate from the global lnbits-sensei.lib. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6adc82e8f3
commit
a21428e482
4 changed files with 238 additions and 0 deletions
32
modules/dev-env/lib.nix
Normal file
32
modules/dev-env/lib.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# lnbits-sensei dev-env — helpers.
|
||||
#
|
||||
# Skeleton-only. Place dev-env-internal helpers here (project path
|
||||
# resolution, worktree-path expansion, remote-URL canonicalisation)
|
||||
# rather than in the global `lnbits-sensei.lib` so they're scoped to
|
||||
# the dev-env module and don't pollute the public helper namespace.
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
|
||||
helpers = {
|
||||
# Resolve a project's on-disk root given a project name.
|
||||
# projectRoot = name: "${config.lnbits-sensei.devEnv.root}/${name}";
|
||||
projectRoot = _name: throw "dev-env.lib.projectRoot: not yet implemented";
|
||||
|
||||
# Resolve a worktree path: <root>/<project>/<worktree>.
|
||||
worktreePath =
|
||||
_project: _worktree: throw "dev-env.lib.worktreePath: not yet implemented";
|
||||
};
|
||||
in
|
||||
{
|
||||
options.lnbits-sensei.devEnv.lib = mkOption {
|
||||
type = types.attrs;
|
||||
internal = true;
|
||||
description = "dev-env-internal helpers (see modules/dev-env/lib.nix).";
|
||||
};
|
||||
|
||||
config = {
|
||||
lnbits-sensei.devEnv.lib = helpers;
|
||||
};
|
||||
}
|
||||
Reference in a new issue