Move use-package and base16 config to early-init.el

Ensure it's run before use-package is used or theme is loaded, since
nix puts these at the start of the extra config block

Run vdirsyncer when khalel first loaded, before importing, to make
sure things are up to date. No run at startup so only affects when
first opening email/org-agenda
This commit is contained in:
Evie Litherland-Smith 2024-12-04 07:07:59 +00:00
parent fd8f675cdb
commit 94a20654cd
2 changed files with 8 additions and 4 deletions

View file

@ -5,6 +5,12 @@
../shell/git.nix
../gpg/default.nix
];
home.file.".emacs.d/early-init.el".text = ''
(setopt use-package-check-before-init t
use-package-enable-imenu-support t
base16-theme-distinct-fringe-background t
base16-theme-highlight-mode-line 'contrast)
'';
services.emacs = {
enable = true;
package = config.programs.emacs.finalPackage;

View file

@ -1,9 +1,6 @@
;;; init.el --- Personal Emacs Config
;;; Commentary:
;;; Code:
(setopt use-package-check-before-init t
use-package-enable-imenu-support t)
(use-package package
:config
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
@ -179,7 +176,7 @@
(use-package khalel
:after (org-agenda)
:commands (khalel-import-events khalel-add-capture-template khalel-run-vdirsyncer)
:commands (khalel-run-vdirsyncer khalel-import-events khalel-add-capture-template)
:custom
(khalel-default-alarm "10")
(khalel-default-calendar nil)
@ -190,6 +187,7 @@
(khalel-import-end-date "+365d")
(khalel-import-org-file-header "#+TITLE: khalel imported calendar events\n#+COLUMNS: %ITEM %TIMESTAMP %LOCATION %CALENDAR\n#+CATEGORY: Calendar\n\n")
:config
(khalel-run-vdirsyncer)
(khalel-import-events)
(khalel-add-capture-template))