From cf976ae14afa540670e0bdc55dffdfe47a8e42bc Mon Sep 17 00:00:00 2001 From: Aner Zakobar Date: Sun, 7 Jun 2026 00:48:20 +0300 Subject: [PATCH] Claude memory, second brain, skills --- AGENTS.md | 186 ++++++++++++++++++++++++------------ CLAUDE.md | 1 + azos-core | 2 +- features/claude/default.nix | 2 + home-manager/home.nix | 2 + 5 files changed, 131 insertions(+), 62 deletions(-) create mode 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md index 853742a..c53805e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -70,76 +70,111 @@ emacsclient -c -e '(switch-to-buffer (get-buffer-create "test"))' emacsclient -e '(message "hello")' ``` -## Code Style Guidelines +## Repository Structure -### File Organization -- **Home-manager modules**: `modules/home-manager/.nix` -- **NixOS modules**: `modules/nixos/.nix` -- **Imports**: All modules in `modules/home-manager/default.nix` and `modules/nixos/default.nix` (alphabetical order) -- **Home config**: `home-manager/home.nix` - main home-manager user config -- **Custom packages**: `pkgs/` - custom package definitions -- **Overlays**: `overlays/` - package overlays (addpkgs, modifications, unstable-packages) +``` +azos/ +├── flake.nix # Main flake +├── home-manager/home.nix # Home-manager entry point; manually imports all modules +├── _machines/ # Per-machine NixOS configs (pass suiteModules as specialArgs) +├── nixos/ # NixOS system configs (configuration.nix, configuration-vm.nix, etc.) +├── features/ # Machine-specific home-manager features (auto-discovered) +├── overlays/ # Package overlays +├── shells/ # Dev shells +└── azos-core/ # Shared feature library (git submodule) + ├── flake.nix + ├── features/ # Shared/reusable features (auto-discovered) + ├── overlays/ # Core overlays + └── _lib/ # Module schema helpers +``` + +Features are auto-discovered by `import-tree` — no central imports file. Each feature's +`default.nix` registers itself via `config.flake.modules.homeManager.`. Modules are +then explicitly imported in `home-manager/home.nix` via `suiteModules.homeManager.`. + +**Where to put a new feature:** +- Shared / reusable across machines → `azos-core/features//default.nix` +- Machine-specific → `azos/features//default.nix` + +## Code Style Guidelines ### Nix Module Template -```nix -{ - lib, - config, - pkgs, - ... -}: let - isEnabled = - config.azos..enable; -in { - options.azos..enable = lib.mkOption { - default = true; - example = true; - type = lib.types.bool; - }; +All features follow this flake-parts registration pattern: - config = lib.mkIf isEnabled { - home.packages = with pkgs; [ pkg1 pkg2 ]; +```nix +{...}: { + config.flake.modules.homeManager. = { + lib, + config, + pkgs, + ... + }: { + options.azos..enable = lib.mkOption { + default = false; + example = true; + type = lib.types.bool; + }; + + config = lib.mkIf config.azos..enable { + home.packages = with pkgs; [pkg1 pkg2]; + }; }; } ``` ### Naming Conventions -- Option paths: `config.azos..