 Defaults to ~/.config/doom, ~/.doom.d or the value of the DOOMDIR envvar;
 whichever is found first. Must end in a slash.")
 
-(defvar doom-autoload-file (concat doom-local-dir "autoloads.el")
+(defconst doom-autoload-file (concat doom-local-dir "autoloads.el")
   "Where `doom-reload-core-autoloads' stores its core autoloads.
 
 This file is responsible for informing Emacs where to find all of Doom's
 autoloaded core functions (in core/autoload/*.el).")
 
-(defvar doom-package-autoload-file (concat doom-local-dir "autoloads.pkg.el")
+(defconst doom-package-autoload-file (concat doom-local-dir "autoloads.pkg.el")
   "Where `doom-reload-package-autoloads' stores its package autoloads.
 
 This file is compiled from the autoloads files of all installed packages
 combined.")
 
-(defvar doom-env-file (concat doom-local-dir "env")
+(defconst doom-env-file (concat doom-local-dir "env")
   "The location of your envvar file, generated by `doom env refresh`.
 
 This file contains environment variables scraped from your shell environment,

These files should not be shared across systems. By default, it is used by
`doom-etc-dir' and `doom-cache-dir'. Must end with a slash.")

(defvar doom-etc-dir (concat doom-local-dir "etc/")
  "Directory for non-volatile local storage.

Use this for files that don't change much, like server binaries, external
dependencies or long-term shared data. Must end with a slash.")

(defvar doom-cache-dir (concat doom-local-dir "cache/")
  "Directory for volatile local storage.

Use this for files that change often, like cache files. Must end with a slash.")

(defvar doom-docs-dir (concat doom-emacs-dir "docs/")
  "Where Doom's documentation files are stored. Must end with a slash.")

(defvar doom-private-dir
  (if-let (doomdir (getenv "DOOMDIR"))
      (file-name-as-directory doomdir)
    (or (let ((xdgdir
               (expand-file-name "doom/"
                                 (or (getenv "XDG_CONFIG_HOME")

decrease this. If you experience stuttering, increase this.")

;;; Directories/files
(defconst doom-emacs-dir
  (eval-when-compile (file-truename user-emacs-directory))
  "The path to the currently loaded .emacs.d directory. Must end with a slash.")

(defconst doom-core-dir (concat doom-emacs-dir "core/")
  "The root directory of Doom's core files. Must end with a slash.")

(defconst doom-modules-dir (concat doom-emacs-dir "modules/")
  "The root directory for Doom's modules. Must end with a slash.")

(defconst doom-local-dir
  (if-let (localdir (getenv "DOOMLOCALDIR"))
      (expand-file-name (file-name-as-directory localdir))
    (concat doom-emacs-dir ".local/"))
  "Root directory for local storage.

