MyNixOS website logo
option

programs.claude-code.configDir

Directory holding Claude Code's configuration files.

Defaults to ~/.claude, matching the upstream claude CLI default, or ${config.xdg.configHome}/claude when home.preferXdgDirectories is enabled and home.stateVersion is at least 26.11. The CLAUDE_CONFIG_DIR environment variable is exported automatically whenever the directory differs from the upstream default so the CLI reads configuration from the same location.

Declarations
Type
string
Default
if config.home.preferXdgDirectories && lib.versionAtLeast config.home.stateVersion "26.11" then
  "${config.xdg.configHome}/claude"
else
  "${config.home.homeDirectory}/.claude"
Example
"${config.xdg.configHome}/claude"