documentation regarding the new core functions

This commit is contained in:
Danilo Reyes
2026-03-16 15:50:14 -06:00
parent 28c8db6cb7
commit 4f4c23d1df
4 changed files with 17 additions and 1 deletions

View File

@@ -29,6 +29,14 @@
- Migration rule: Legacy flat `modules/<category>/<name>.nix` modules remain supported while features are moved into split directories.
- Implication: Place new dual-surface modules in a feature directory so NixOS and Home Manager stay adjacent; no manual import wiring is required unless adding a new factory.
## Home Manager Helpers
- Shared helper home: `parts/core.nix` exports reusable Home Manager helper functions through `inputs.self.lib`.
- Current helpers:
- `hmModule` → derive default HM enablement from `osConfig.my.<path>` and the current Home Manager username.
- `hmShellType` → resolve `bash` vs `zsh` consistently for HM modules with or without `osConfig`.
- `hmOnlyUser` → gate HM snippets to a specific username when a feature is intentionally user-specific.
- Usage rule: Use these helpers for repeated wrapper logic; keep feature-specific package sets and config payloads in local `common.nix` or `home.nix` files.
## Hosts and Roles
- Configs: `hosts/<name>/configuration.nix` with toggles in `hosts/<name>/toggles.nix`.
- Active hosts: `workstation`, `server`, `miniserver`, `galaxy`, `emacs`, `vps`.