Move package config into init.el, remove install.el / Makefile / my-packages.el

Rename lib/mu4e-custom.el -> modules/my-mu4e.el
This commit is contained in:
Evie Litherland-Smith 2024-07-14 11:57:13 +01:00
parent 3360d22e0f
commit 24b36c5de1
5 changed files with 33 additions and 62 deletions

View file

@ -1,6 +0,0 @@
.PHONY: default install
default: install
install:
emacs --script install.el --kill

42
init.el
View file

@ -4,21 +4,39 @@
;; To install packages on non-NixOS systems run `install.el'
;;; Code:
;; Customise `use-package' behaviour, must be set before first time
;; it's used
(setopt use-package-check-before-init t
use-package-enable-imenu-support t)
;; Stop popups for warning messages, keep in log buffer
(setopt warning-minimum-level :error)
;; Disable `suspend-frame' command
(put 'suspend-frame 'disabled
"Doesn't work nicely with tiling window managers (e.g. Sway)")
;; Customise `use-package' behaviour, must be set before first time
;; it's used. Configure packages archives with priority
(setopt use-package-check-before-init t
use-package-enable-imenu-support t)
;; Configure packages archives, with priority, and list of installed
;; packages
(load-file (locate-user-emacs-file "lib/my-packages.el"))
(use-package package
:custom
(package-archive-priorities '(("melpa" . 1) ("stable" . 2) ("nongnu" . 3) ("gnu" . 4)))
(package-selected-packages
'(;; Theme
base16-theme
;; UI
all-the-icons nerd-icons nerd-icons-completion nerd-icons-corfu nerd-icons-dired nerd-icons-ibuffer
minions ligature page-break-lines helpful which-key ace-window link-hint diff-hl
;; Completion
vertico orderless marginalia cape corfu corfu-terminal
consult consult-eglot consult-flyspell embark embark-consult
flyspell-correct tempel
;; IDE
treesit-auto magit forge flymake-popon flymake-shellcheck flymake-yamllint flymake-eslint
apheleia envrc rainbow-delimiters aggressive-indent python-docstring nix-mode lua-mode
;; Writing
org-roam org-noter citar citar-embark
markdown-mode pandoc-mode auctex htmlize
;; Other
password-store emms bbdb ement elfeed elfeed-org))
: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"))
(when (and custom-file
@ -1120,7 +1138,7 @@ Calls `project-remember-projects-under' for ~/Projects/"
:custom
(bbdb-file (locate-user-emacs-file "bbdb.gpg")))
(load-file (locate-user-emacs-file "lib/mu4e-custom.el"))
(load-file (locate-user-emacs-file "modules/my-mu4e.el"))
(use-package erc
:commands erc-compute-nick

View file

@ -1,10 +0,0 @@
;;; install.el -- Handle installing selected packages -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;; Configure packages archives with priority
(load-file "lib/my-packages.el")
(package-refresh-contents)
(package-install-selected-packages)
(package-autoremove)
(provide 'install)
;;; install.el ends here

View file

@ -1,31 +0,0 @@
;;; my-packages.el -- Setup package.el archives and priorities -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(use-package package
:custom
(package-archive-priorities '(("melpa" . 1) ("stable" . 2) ("nongnu" . 3) ("gnu" . 4)))
(package-selected-packages
'(;; Theme
base16-theme
;; UI
all-the-icons nerd-icons nerd-icons-completion nerd-icons-corfu nerd-icons-dired nerd-icons-ibuffer
minions ligature page-break-lines helpful which-key ace-window link-hint diff-hl
;; Completion
vertico orderless marginalia cape corfu corfu-terminal
consult consult-eglot consult-flyspell embark embark-consult
flyspell-correct tempel
;; IDE
treesit-auto magit forge flymake-popon flymake-shellcheck flymake-yamllint flymake-eslint
apheleia envrc rainbow-delimiters aggressive-indent python-docstring nix-mode lua-mode
;; Writing
org-roam org-noter citar citar-embark
markdown-mode pandoc-mode auctex htmlize
;; Other
password-store emms bbdb ement elfeed elfeed-org))
: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 'my-packages)
;;; my-packages.el ends here

View file

@ -1,4 +1,4 @@
;;; mu4e-custom.el -- mu4e -*- lexical-binding: t -*-
;;; my-mu4e.el -- mu4e -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(setq sendmail-program (executable-find "msmtp")
@ -287,5 +287,5 @@
(mu4e-icalendar-setup)
(gnus-icalendar-org-setup))
(provide 'mu4e-custom)
;;; mu4e-custom.el ends here
(provide 'my-mu4e)
;;; my-mu4e.el ends here