chore: scaffold flake + settings + entry-point quartet

Single-source-of-truth pattern: settings.nix threads identity, host,
and remote topology into every module via specialArgs. configuration.nix
and home.nix stay thin import-lists so module composition is obvious.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-05-24 22:25:52 +02:00
commit 3f528623b3
4 changed files with 208 additions and 0 deletions

56
configuration.nix Normal file
View file

@ -0,0 +1,56 @@
# lnbits-sensei — NixOS entry point.
#
# Thin by design. All real config lives in modules/. This file imports
# the module set and wires per-host settings (hostname, timezone) from
# the shared `settings` attrset.
{
config,
pkgs,
lib,
settings,
...
}:
{
imports = [
# Generated by `nixos-generate-config`. Drop your real
# hardware-configuration.nix in alongside this file before the
# first build.
# ./hardware-configuration.nix
# Shared helpers (config.lnbits-sensei.lib).
./modules/lib.nix
# Option schema (lnbits-sensei.*).
./modules/core.nix
# LNbits service wrapper.
./modules/lnbits.nix
# Git remote topology — upstream / fork / extras.
./modules/git/remotes.nix
# Dev environment (worktree mgmt, regtest, fakewallet, tmux).
./modules/dev-env
];
# --- Per-host settings ---
lnbits-sensei = {
enable = true;
user = settings.user;
hostName = settings.hostName;
};
networking.hostName = settings.hostName;
time.timeZone = settings.timeZone;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Pin the state version that matches the nixpkgs input. Bump
# deliberately after reviewing release notes — never auto.
system.stateVersion = "24.11";
}