Compare commits

...

3 commits

Author SHA1 Message Date
Evie Litherland-Smith b8133c7971 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
2024-12-02 17:43:29 +00:00
Evie Litherland-Smith d8cb9b526b Initial copy of init.el from Emacs config repo 2024-12-02 17:40:36 +00:00
Evie Litherland-Smith 8752c19241 Add Emacs packages - using nix to manage installed packages now 2024-12-02 17:16:40 +00:00
6 changed files with 1498 additions and 62 deletions

View file

@ -20,12 +20,52 @@
withImageMagick = true;
withPgtk = true;
};
extraConfig = builtins.readFile ./extraConfig.el;
extraConfig = builtins.readFile ./init.el;
extraPackages =
epkgs: with epkgs; [
treesit-grammars.with-all-grammars
emacsql-sqlite
# UI and Appearance
delight
nerd-icons
nerd-icons-dired
nerd-icons-ibuffer
nerd-icons-corfu
visual-fill-column
# Email and Calendar
khalel
mu4e
# Other (TODO sort)
ligature
which-key
diff-hl
org-roam
org-noter
citar
vertico
marginalia
orderless
corfu
corfu-terminal
cape
consult
consult-eglot
tempel
rainbow-delimiters
envrc
treesit-grammars.with-all-grammars
treesit-auto
apheleia
flymake-shellcheck
flymake-yamllint
flymake-clippy
flymake-eslint
magit
forge
nix-mode
lua-mode
auctex
markdown-mode
pandoc-mode
scad-mode
];
};
home.packages = with pkgs; [

View file

@ -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))))

1453
system/home/emacs/init.el Normal file

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,6 @@
{
home.packages = [
(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 "clean-config" (builtins.readFile ./shell/clean-config.sh))
(pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh))

View file

@ -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
)

View file

@ -8,8 +8,8 @@
./cava.nix
];
home.shellAliases = {
sync-all = "sync-git; sync-emacs";
sync-and-shutdown = "sync-git && vdirsyncer sync && mbsync -a && shutdown now";
sync-all = "sync-git; vdirsyncer sync; mbsync -a";
sync-and-shutdown = "sync-all && shutdown now";
protonup = "sudo wg-quick up protonvpn && sudo wg";
protondown = "sudo wg-quick down protonvpn";
};