Move Emacs config into nix
Combine with extraConfig.el as init.el Add missing ligature package Remove sync-emacs script and alias, set sync-all back to actually syncing everything
This commit is contained in:
parent
d8cb9b526b
commit
b8133c7971
|
@ -20,7 +20,7 @@
|
||||||
withImageMagick = true;
|
withImageMagick = true;
|
||||||
withPgtk = true;
|
withPgtk = true;
|
||||||
};
|
};
|
||||||
extraConfig = builtins.readFile ./extraConfig.el;
|
extraConfig = builtins.readFile ./init.el;
|
||||||
extraPackages =
|
extraPackages =
|
||||||
epkgs: with epkgs; [
|
epkgs: with epkgs; [
|
||||||
# UI and Appearance
|
# UI and Appearance
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
khalel
|
khalel
|
||||||
mu4e
|
mu4e
|
||||||
# Other (TODO sort)
|
# Other (TODO sort)
|
||||||
|
ligature
|
||||||
which-key
|
which-key
|
||||||
diff-hl
|
diff-hl
|
||||||
org-roam
|
org-roam
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
(defun my/configure-theme ()
|
|
||||||
"Load theme and configure some faces."
|
|
||||||
(interactive)
|
|
||||||
|
|
||||||
;; Set some font-lock faces to be italic
|
|
||||||
(set-face-attribute 'font-lock-doc-face nil :slant 'italic)
|
|
||||||
(set-face-attribute 'font-lock-comment-face nil :slant 'italic)
|
|
||||||
(set-face-attribute 'font-lock-comment-delimiter-face nil :slant 'italic)
|
|
||||||
|
|
||||||
;; Change outline headers to follow rainbow order
|
|
||||||
(require 'outline)
|
|
||||||
(when (boundp 'base16-stylix-theme-colors)
|
|
||||||
(dolist (pairing '((outline-1 . :base08)
|
|
||||||
(outline-2 . :base09)
|
|
||||||
(outline-3 . :base0A)
|
|
||||||
(outline-4 . :base0B)
|
|
||||||
(outline-5 . :base0C)
|
|
||||||
(outline-6 . :base0D)
|
|
||||||
(outline-7 . :base0E)
|
|
||||||
(outline-8 . :base0F)))
|
|
||||||
(set-face-attribute (car pairing) nil
|
|
||||||
:foreground
|
|
||||||
(plist-get base16-stylix-theme-colors (cdr pairing))))
|
|
||||||
|
|
||||||
(require 'org-faces)
|
|
||||||
;; Lighten `org-agenda-clocking' background to be more legible.
|
|
||||||
(set-face-attribute 'org-agenda-clocking nil :background
|
|
||||||
(plist-get base16-stylix-theme-colors :base01))
|
|
||||||
;; Set `org-hide' face to actually match background colour
|
|
||||||
(set-face-attribute 'org-hide nil :foreground
|
|
||||||
(plist-get base16-stylix-theme-colors :base00))
|
|
||||||
(with-eval-after-load 'org-noter
|
|
||||||
(set-face-attribute 'org-noter-no-notes-exist-face nil :foreground
|
|
||||||
(plist-get base16-stylix-theme-colors :base08))
|
|
||||||
(set-face-attribute 'org-noter-notes-exist-face nil :foreground
|
|
||||||
(plist-get base16-stylix-theme-colors :base0B))))
|
|
||||||
)
|
|
||||||
|
|
||||||
(with-eval-after-load 'base16-theme
|
|
||||||
(require 'server)
|
|
||||||
(add-hook 'after-init-hook (lambda () (my/configure-theme)))
|
|
||||||
(add-hook 'server-after-make-frame-hook (lambda () (my/configure-theme))))
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
(setq user-full-name "Evie Litherland-Smith"
|
(setq user-full-name "Evie Litherland-Smith"
|
||||||
user-mail-address "evie@xenia.me.uk"
|
user-mail-address "evie@xenia.me.uk"
|
||||||
custom-file (locate-user-emacs-file "custom.el")
|
|
||||||
use-short-answers t
|
use-short-answers t
|
||||||
kill-do-not-save-duplicates t)
|
kill-do-not-save-duplicates t)
|
||||||
|
|
||||||
|
@ -19,7 +18,7 @@
|
||||||
(global-auto-revert-mode +1)
|
(global-auto-revert-mode +1)
|
||||||
(delete-selection-mode +1)
|
(delete-selection-mode +1)
|
||||||
|
|
||||||
(setq warning-minimum-level :error)
|
;; (setq warning-minimum-level :error)
|
||||||
|
|
||||||
(keymap-global-set "<mouse-8>" #'previous-buffer)
|
(keymap-global-set "<mouse-8>" #'previous-buffer)
|
||||||
(keymap-global-set "<mouse-9>" #'next-buffer)
|
(keymap-global-set "<mouse-9>" #'next-buffer)
|
||||||
|
@ -28,10 +27,6 @@
|
||||||
|
|
||||||
(use-package secrets)
|
(use-package secrets)
|
||||||
|
|
||||||
(setq inhibit-splash-screen t
|
|
||||||
initial-frame-alist nil
|
|
||||||
default-frame-alist nil)
|
|
||||||
|
|
||||||
(setq-default truncate-lines t
|
(setq-default truncate-lines t
|
||||||
truncate-partial-width-windows nil)
|
truncate-partial-width-windows nil)
|
||||||
|
|
||||||
|
@ -173,13 +168,11 @@
|
||||||
(window-height . 0.2)
|
(window-height . 0.2)
|
||||||
(window-parameters . ((no-delete-other-windows . t))))))
|
(window-parameters . ((no-delete-other-windows . t))))))
|
||||||
|
|
||||||
(use-package mu4e-icalendar
|
(use-package gnus-icalendar
|
||||||
:after (mu4e org-agenda)
|
:after (calendar mu4e org-agenda)
|
||||||
:functions (mu4e-icalendar-setup)
|
:functions (gnus-icalendar-setup)
|
||||||
:custom
|
|
||||||
(mu4e-icalendar-trash-after-reply nil)
|
|
||||||
:config
|
:config
|
||||||
(mu4e-icalendar-setup))
|
(gnus-icalendar-setup))
|
||||||
|
|
||||||
(use-package khalel
|
(use-package khalel
|
||||||
:if (package-installed-p 'khalel)
|
:if (package-installed-p 'khalel)
|
||||||
|
@ -1374,13 +1367,6 @@
|
||||||
;; Scratch buffer shortcut
|
;; Scratch buffer shortcut
|
||||||
(keymap-global-set "C-c w x" #'scratch-buffer)
|
(keymap-global-set "C-c w x" #'scratch-buffer)
|
||||||
|
|
||||||
;; Config file shortcut
|
|
||||||
(defun my/open-config-file ()
|
|
||||||
"Open Emacs config file."
|
|
||||||
(interactive)
|
|
||||||
(find-file (locate-user-emacs-file "README.org")))
|
|
||||||
(keymap-global-set "C-c w e" #'my/open-config-file)
|
|
||||||
|
|
||||||
;; Tempel template file shortcut
|
;; Tempel template file shortcut
|
||||||
(defun my/open-template-file ()
|
(defun my/open-template-file ()
|
||||||
"Open `tempel' template file."
|
"Open `tempel' template file."
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
{
|
{
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(pkgs.writeShellScriptBin "sync-git" (builtins.readFile ./shell/sync-git.sh))
|
(pkgs.writeShellScriptBin "sync-git" (builtins.readFile ./shell/sync-git.sh))
|
||||||
(pkgs.writeShellScriptBin "sync-emacs" (builtins.readFile ./shell/sync-emacs.sh))
|
|
||||||
(pkgs.writeShellScriptBin "ensure-pass" (builtins.readFile ./shell/ensure-pass.sh))
|
(pkgs.writeShellScriptBin "ensure-pass" (builtins.readFile ./shell/ensure-pass.sh))
|
||||||
(pkgs.writeShellScriptBin "clean-config" (builtins.readFile ./shell/clean-config.sh))
|
(pkgs.writeShellScriptBin "clean-config" (builtins.readFile ./shell/clean-config.sh))
|
||||||
(pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh))
|
(pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh))
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
# Clone ~/.config/emacs/ if it doesn't exist
|
|
||||||
EMACS_DIR="$HOME/.emacs.d"
|
|
||||||
if [ ! -d "$EMACS_DIR" ]; then
|
|
||||||
git clone "https://git.xenia.me.uk/pixelifytica/emacs.git" "$EMACS_DIR"
|
|
||||||
fi
|
|
||||||
(
|
|
||||||
cd "$EMACS_DIR" || exit 1
|
|
||||||
# Pull changes by fast-forwarding only
|
|
||||||
git pull --ff --ff-only
|
|
||||||
# Update submodules for local packages
|
|
||||||
git submodule update --init --recursive
|
|
||||||
# Install and update extensions
|
|
||||||
make install
|
|
||||||
)
|
|
|
@ -8,8 +8,8 @@
|
||||||
./cava.nix
|
./cava.nix
|
||||||
];
|
];
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
sync-all = "sync-git; sync-emacs";
|
sync-all = "sync-git; vdirsyncer sync; mbsync -a";
|
||||||
sync-and-shutdown = "sync-git && vdirsyncer sync && mbsync -a && shutdown now";
|
sync-and-shutdown = "sync-all && shutdown now";
|
||||||
protonup = "sudo wg-quick up protonvpn && sudo wg";
|
protonup = "sudo wg-quick up protonvpn && sudo wg";
|
||||||
protondown = "sudo wg-quick down protonvpn";
|
protondown = "sudo wg-quick down protonvpn";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue