Files
roam/azosarchitecture.org
2026-06-17 07:36:46 +03:00

2.0 KiB

azos/architecture

Architecture

azos is a NixOS/home-manager configuration repo with a two-tier feature system:

  • azos-core/ — git submodule containing shared, reusable features (base, editor, claude-memory, claude-skills, dev, etc.)
  • features/ — machine-specific features (claude, encryption, hyprland, audio, etc.)
  • home-manager/home.nix — home-manager entry point; manually lists all modules to import
  • _machines/ — per-machine NixOS configs; passes suiteModules as specialArgs

Feature auto-discovery is via import-tree in each flake.nix. Features from both azos-core/features/ and azos/features/ are collected into config.flake.modules.

Module registration pattern

Each feature's default.nix registers itself:

config.flake.modules.homeManager.<name> = { lib, config, pkgs, ... }: {
  options.azos.<name>.enable = lib.mkOption { ... };
  config = lib.mkIf config.azos.<name>.enable { ... };
};

Modules are then imported in home-manager/home.nix via:

imports = [ suiteModules.homeManager.<name> ... ];

Option namespace

azos.<feature-name>.<option-name>

Dependencies between features use lib.mkDefault true to auto-enable:

azos.claude-memory.enable = lib.mkDefault true;
azos.claude-skills.enable = lib.mkDefault true;

File deployment

  • Static files: home.file."path".source = ./file;
  • Generated text: home.file."path".text = "...";
  • Runtime scripts (e.g. merging JSON): home.activation.<name> = lib.hm.dag.entryAfter ["writeBoundary"] ''...'';

Claude Code integration

Three azos-core features wire up Claude Code:

  • claude-memory — registers org-roam-mcp as a global MCP server in ~/.claude.json
  • claude-skills — deploys skills to ~/.claude/commands/ and content to ~/.claude/CLAUDE.md
  • claude (azos/features) — installs claude-code, auto-enables the above two