diff --git a/.fx/config/README.md b/.fx/config/README.md
deleted file mode 100644
index fe32e9b..0000000
--- a/.fx/config/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# fx configs
-
-Place configuration files that influence `fx` operation in this directory.
-
-* `build-auth` reflects configuration that influences authentication for
- build services like RBE and ResultStore. Settings are auto-detected,
- but can be manually overridden. Used by `fx rbe auth` and `fx build`.
-* `build-metrics` controls pushing of RBE logs and metrics to BigQuery.
- Set by `fx build-metrics`, and used by `fx build`.
-* `build-profile` controls profiling local memory and network usage during
- build. Set by `fx build-profile`, and used by `fx build`.
-* `metrics` controls per-tree behaviors of sending fx metrics to Google
- Analytics.
diff --git a/.gitignore b/.gitignore
index be7615f..8c5c7f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,7 +64,6 @@
# instead of adding new top-level files, to avoid cluttering this .gitignore
# file and the top level of local checkouts.
/.fx/
-!/.fx/config/README.md
.fx-build-dir
.fx-metrics-config
.fx-multi-list
diff --git a/tools/devshell/README.md b/tools/devshell/README.md
index 9749730..d55c998 100644
--- a/tools/devshell/README.md
+++ b/tools/devshell/README.md
@@ -123,6 +123,20 @@
users should not rely on them - only the above list are to be preserved
(unless marked deprecated).
+## fx configs
+
+Place configuration files that influence `fx` operation in the `.fx/config` directory.
+
+* `build-auth` reflects configuration that influences authentication for
+ build services like RBE and ResultStore. Settings are auto-detected,
+ but can be manually overridden. Used by `fx rbe auth` and `fx build`.
+* `build-metrics` controls pushing of RBE logs and metrics to BigQuery.
+ Set by `fx build-metrics`, and used by `fx build`.
+* `build-profile` controls profiling local memory and network usage during
+ build. Set by `fx build-profile`, and used by `fx build`.
+* `metrics` controls per-tree behaviors of sending fx metrics to Google
+ Analytics.
+
## Optional features
`fx` supports the definition of optional features that are enabled by default
diff --git a/tools/devshell/lib/vars.sh b/tools/devshell/lib/vars.sh
index cb36453..e8ed23e 100644
--- a/tools/devshell/lib/vars.sh
+++ b/tools/devshell/lib/vars.sh
@@ -53,6 +53,10 @@
# in the names of any cached artifacts to make naming collisions less likely.
export FX_CACHE_DIR="${FUCHSIA_DIR}/.fx"
+# If the fx config does not exist, create it.
+FX_CONFIG_DIR="${FX_CACHE_DIR}/config"
+[ -d "${FX_CONFIG_DIR}" ] || mkdir -p "${FX_CONFIG_DIR}"
+
# This allows LLVM utilities to perform debuginfod lookups for public artifacts.
# See https://sourceware.org/elfutils/Debuginfod.html.
# TODO(111990): Replace this with a local authenticating proxy to support access
@@ -70,7 +74,7 @@
# If build profiling is enabled, collect system stats during build,
# including CPU, memory, disk I/O...
BUILD_PROFILE_ENABLED=1
-readonly fx_build_profile_config="${FUCHSIA_DIR}/.fx/config/build-profile"
+readonly fx_build_profile_config="${FX_CONFIG_DIR}/build-profile"
readonly fx_build_profile_config_old="${FUCHSIA_DIR}/.fx-build-profile-config"
if [[ -f "$fx_build_profile_config_old" ]]; then
fx-info "Moving $fx_build_profile_config_old to new location $fx_build_profile_config. No further action is necessary."
@@ -88,7 +92,7 @@
# If ResultStore is enabled, wrap builds with ResultStore tools.
RESULTSTORE_ENABLED=0
-readonly fx_resultstore_config="${FUCHSIA_DIR}/.fx/config/resultstore"
+readonly fx_resultstore_config="${FX_CONFIG_DIR}/resultstore"
if [[ -f "$fx_resultstore_config" ]]; then
# shellcheck source=/dev/null
source "$fx_resultstore_config"