feat(flake): expose nixosModules.omnixy core aggregate
Extract the reusable core module list into modules/default.nix (single source of truth) and expose it as nixosModules.omnixy / .default. configuration.nix now imports ./modules instead of listing each module, so this repo's hosts and external consumers share one definition. Theme stays a settings.theme-driven import inside the aggregate. Packs, dev-env, sops and home-manager remain injected by mkSystem. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
8678f637db
commit
1e2677c543
3 changed files with 68 additions and 22 deletions
|
|
@ -15,28 +15,14 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# NOTE: hardware-configuration.nix is imported per-host from
|
# Omnixient core module aggregate (modules/default.nix) — the same set
|
||||||
# hosts/<name>/default.nix (it's machine-specific), not here.
|
# exposed as nixosModules.omni for external consumers, so there's a
|
||||||
|
# single source of truth for the core module list. The active theme
|
||||||
# Omnixient modules
|
# is selected inside it from settings.theme.
|
||||||
./modules/lib.nix
|
#
|
||||||
./modules/core.nix
|
# hardware-configuration.nix is imported per-host from
|
||||||
./modules/colors.nix
|
# hosts/<name>/default.nix (machine-specific), not here.
|
||||||
./modules/boot.nix
|
./modules
|
||||||
./modules/security.nix
|
|
||||||
./modules/secrets.nix
|
|
||||||
./modules/fastfetch.nix
|
|
||||||
./modules/walker.nix
|
|
||||||
./modules/scripts.nix
|
|
||||||
./modules/menus.nix
|
|
||||||
./modules/desktop/hyprland.nix
|
|
||||||
./modules/packages.nix
|
|
||||||
./modules/development.nix
|
|
||||||
./modules/mcp.nix
|
|
||||||
./modules/themes/${currentTheme}.nix
|
|
||||||
./modules/users.nix
|
|
||||||
./modules/services.nix
|
|
||||||
./modules/hardware
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# --- Per-host settings (edit these) ---
|
# --- Per-host settings (edit these) ---
|
||||||
|
|
|
||||||
12
flake.nix
12
flake.nix
|
|
@ -311,6 +311,18 @@
|
||||||
# / bitcoin packs are standalone-importable — usable on a non-omni
|
# / bitcoin packs are standalone-importable — usable on a non-omni
|
||||||
# NixOS without enabling omni core.
|
# NixOS without enabling omni core.
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
|
# Omnixient core, as a single importable module. A consumer using
|
||||||
|
# this flake as an input builds a host with:
|
||||||
|
# omni.lib.mkSystem "myhost" {
|
||||||
|
# settings = { ... };
|
||||||
|
# modules = [ omni.nixosModules.omni ./hosts/myhost ];
|
||||||
|
# };
|
||||||
|
# mkSystem also injects packs + home-manager; this provides the
|
||||||
|
# desktop/system core (option namespace + behavior). Theme is
|
||||||
|
# chosen from settings.theme.
|
||||||
|
omni = import ./modules;
|
||||||
|
default = import ./modules;
|
||||||
|
|
||||||
lnbits = import ./modules/packs/lnbits.nix;
|
lnbits = import ./modules/packs/lnbits.nix;
|
||||||
aiolabs = import ./modules/packs/aiolabs.nix;
|
aiolabs = import ./modules/packs/aiolabs.nix;
|
||||||
bitcoin = import ./modules/packs/bitcoin.nix;
|
bitcoin = import ./modules/packs/bitcoin.nix;
|
||||||
|
|
|
||||||
48
modules/default.nix
Normal file
48
modules/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
# Omnixient core module aggregate.
|
||||||
|
#
|
||||||
|
# The reusable Omnixient module set as a single importable module, used from
|
||||||
|
# one source of truth in two places:
|
||||||
|
# - configuration.nix imports it for this repo's own hosts;
|
||||||
|
# - it's exposed as `nixosModules.omni` (flake.nix) so an external
|
||||||
|
# consumer can `imports = [ omni.nixosModules.omni ]` from their
|
||||||
|
# own flake without forking.
|
||||||
|
#
|
||||||
|
# Deliberately NOT here:
|
||||||
|
# - modules/packs and modules/dev-env — injected separately by
|
||||||
|
# lib/mksystem.nix (packs unconditionally, dev-env opt-in);
|
||||||
|
# - hardware-configuration.nix — per-host;
|
||||||
|
# - the sops-nix / home-manager modules — injected by mkSystem.
|
||||||
|
#
|
||||||
|
# The active theme is selected from `settings.theme` (a specialArg
|
||||||
|
# provided by mkSystem), matching the prior configuration.nix behavior.
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./lib.nix
|
||||||
|
./core.nix
|
||||||
|
./colors.nix
|
||||||
|
./boot.nix
|
||||||
|
./security.nix
|
||||||
|
./secrets.nix
|
||||||
|
./fastfetch.nix
|
||||||
|
./walker.nix
|
||||||
|
./scripts.nix
|
||||||
|
./menus.nix
|
||||||
|
./desktop/hyprland.nix
|
||||||
|
./packages.nix
|
||||||
|
./development.nix
|
||||||
|
./mcp.nix
|
||||||
|
./users.nix
|
||||||
|
./services.nix
|
||||||
|
./hardware
|
||||||
|
|
||||||
|
# Theme: import the colorscheme module named by settings.theme. Kept
|
||||||
|
# as a settings-driven dynamic import (rather than importing all 12
|
||||||
|
# and guarding each) so the closure stays minimal.
|
||||||
|
(
|
||||||
|
{ settings, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./themes/${settings.theme}.nix ];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue