Skip to content

Commit

Permalink
tweak(core)!: change the proxy handling mechanism (don't enable globa…
Browse files Browse the repository at this point in the history
…lly)
  • Loading branch information
abougouffa committed May 15, 2024
1 parent 401c43b commit 67bbfde
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@
;; Load user init tweaks when available
(+load-user-configs 'init-tweaks 'local/init-tweaks)

;; When `minemacs-proxies' is set in "early-init.el" or in "init-tweaks.el",
;; `minemacs-enable-proxy' will set the environment variables accordingly.
(minemacs-enable-proxy minemacs-proxies)

;; HACK: Load the environment variables saved from shell using `+env-save' to
;; `+env-file'. `+env-save' saves all environment variables except these matched
;; by `+env-deny-vars'.
Expand Down Expand Up @@ -245,22 +241,27 @@ goes idle."
'(me-builtin me-gc)
minemacs-core-modules)))

;; Load MinEmacs modules
(dolist (module-file (append
(mapcar (apply-partially #'format "%s%s.el" minemacs-core-dir) minemacs-core-modules)
(mapcar (apply-partially #'format "%s%s.el" minemacs-modules-dir) minemacs-modules)))
(+load module-file))

(run-hooks 'minemacs-after-loading-modules-hook)

;; Write user custom variables to separate file instead of "init.el"
(setq custom-file (concat minemacs-config-dir "custom-vars.el"))

;; Load the custom variables file if it exists
(when (file-exists-p custom-file) (+load custom-file))

;; Load user configuration
(+load-user-configs 'config 'local/config)
;; When `minemacs-proxies' is set in "early-init.el" or in "init-tweaks.el",
;; `+with-proxies' will set the environment variables accordingly. This is
;; useful when you are on a network that requires a specific proxy to connect to
;; internet.
(+with-proxies
;; Load MinEmacs modules
(dolist (module-file (append
(mapcar (apply-partially #'format "%s%s.el" minemacs-core-dir) minemacs-core-modules)
(mapcar (apply-partially #'format "%s%s.el" minemacs-modules-dir) minemacs-modules)))
(+load module-file))

(run-hooks 'minemacs-after-loading-modules-hook)

;; Write user custom variables to separate file instead of "init.el"
(setq custom-file (concat minemacs-config-dir "custom-vars.el"))

;; Load the custom variables file if it exists
(when (file-exists-p custom-file) (+load custom-file))

;; Load user configuration
(+load-user-configs 'config 'local/config))


(+log! "Loaded init.el")
Expand Down

0 comments on commit 67bbfde

Please sign in to comment.