Move package config to separate file to be used by install.el
This commit is contained in:
parent
e66638ca13
commit
2daf0a4b03
14
init.el
14
init.el
|
@ -1,23 +1,13 @@
|
||||||
;;; init.el -- My emacs config -*- lexical-binding: t -*-
|
;;; init.el -- My emacs config -*- lexical-binding: t -*-
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; Moving my Emacs config from separate directory
|
;; Moving my Emacs config from separate directory
|
||||||
;; To install packages on non-NixOS systems:
|
;; To install packages on non-NixOS systems run `install.el'
|
||||||
;; `(setq prog-mode-hook nil lisp-data-mode-hook nil)'
|
|
||||||
;; `(package-install-selected-packages)'
|
|
||||||
;; Optionally autoremove unneeded packages:
|
|
||||||
;; `(package-autoremove)'
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
;; Stop popups for warning messages, keep in log buffer
|
;; Stop popups for warning messages, keep in log buffer
|
||||||
(setopt warning-minimum-level :error)
|
(setopt warning-minimum-level :error)
|
||||||
|
|
||||||
;; Configure packages archives with priority
|
;; Configure packages archives with priority
|
||||||
(use-package package
|
(require 'package-config)
|
||||||
:custom
|
|
||||||
(package-archive-priorities '(("melpa" . 10) ("stable" . 5) ("nongnu" . 5) ("gnu" . 0)))
|
|
||||||
:config
|
|
||||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
|
|
||||||
(add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/"))
|
|
||||||
(package-initialize))
|
|
||||||
|
|
||||||
(setq custom-file (locate-user-emacs-file "custom.el"))
|
(setq custom-file (locate-user-emacs-file "custom.el"))
|
||||||
(when (and custom-file (file-exists-p custom-file))
|
(when (and custom-file (file-exists-p custom-file))
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
;;; install.el -- Handle installing selected packages -*- lexical-binding: t -*-
|
;;; install.el -- Handle installing selected packages -*- lexical-binding: t -*-
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(setq prog-mode-hook nil
|
;; Configure packages archives with priority
|
||||||
lisp-data-mode-hook nil)
|
(require 'package-config)
|
||||||
(package-refresh-contents)
|
(package-refresh-contents)
|
||||||
(setopt package-selected-packages
|
(setopt package-selected-packages
|
||||||
'(
|
'(
|
||||||
|
|
12
package-config.el
Normal file
12
package-config.el
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
;;; package-config.el -- Setup package.el archives and priorities -*- lexical-binding: t -*-
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
(use-package package
|
||||||
|
:custom
|
||||||
|
(package-archive-priorities '(("melpa" . 10) ("stable" . 5) ("nongnu" . 5) ("gnu" . 0)))
|
||||||
|
:config
|
||||||
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
|
||||||
|
(add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/"))
|
||||||
|
(package-initialize))
|
||||||
|
(provide 'package-config)
|
||||||
|
;;; package-config.el ends here
|
Loading…
Reference in a new issue