2026-06-10 17:22:00 +01:00
|
|
|
# Claude Code, configured declaratively via home-manager. Wanted on every host.
|
|
|
|
|
#
|
2026-06-10 17:26:50 +01:00
|
|
|
# The STATIC config is managed here: the global CLAUDE.md (persona/context), the
|
|
|
|
|
# custom output style, and the auto-memory directory. settings.json is
|
|
|
|
|
# deliberately left UNMANAGED -- Claude Code rewrites it at runtime (interactive
|
|
|
|
|
# permission grants, /config), and a read-only /nix/store symlink would break
|
|
|
|
|
# those writes.
|
|
|
|
|
#
|
|
|
|
|
# Memory is the source of truth in this repo (./claude/memory). It is symlinked
|
|
|
|
|
# read-only into ~/.claude/memory, so the runtime "save a memory" path no longer
|
|
|
|
|
# writes there -- recall still works, but new/changed memories must be added to
|
|
|
|
|
# this repo and rebuilt. CLAUDE.md instructs Claude to do exactly that.
|
2026-06-10 17:22:00 +01:00
|
|
|
{ ... }:
|
|
|
|
|
{
|
|
|
|
|
programs.claude-code = {
|
|
|
|
|
enable = true;
|
|
|
|
|
# package defaults to pkgs.claude-code (tracked to unstable via the flake
|
|
|
|
|
# overlay); installs the CLI on every host.
|
|
|
|
|
|
2026-06-10 17:26:50 +01:00
|
|
|
# ~/.claude/CLAUDE.md -- global instructions / persona / memory workflow.
|
2026-06-10 17:22:00 +01:00
|
|
|
context = ./claude/CLAUDE.md;
|
|
|
|
|
};
|
|
|
|
|
|
2026-06-10 17:26:50 +01:00
|
|
|
home.file = {
|
|
|
|
|
# Custom output style. The module has no option for output-styles/, so place
|
|
|
|
|
# it directly; selection (settings.json `outputStyle`) stays mutable.
|
|
|
|
|
".claude/output-styles/soviet-engineer.md".source = ./claude/output-styles/soviet-engineer.md;
|
|
|
|
|
|
|
|
|
|
# Auto-memory directory, Nix-managed (read-only). Edit ./claude/memory in
|
|
|
|
|
# this repo and rebuild to change what Claude remembers.
|
|
|
|
|
".claude/memory".source = ./claude/memory;
|
|
|
|
|
};
|
2026-06-10 17:22:00 +01:00
|
|
|
}
|