Move Emacs init.el and templates back to own repo, keep packages managed by nix
Restore sync-emacs script but without make step, include cleaning up old Emacs config
This commit is contained in:
parent
63fcc689bc
commit
86938499ad
|
@ -12,22 +12,12 @@
|
|||
../texlive/default.nix
|
||||
../programming/default.nix
|
||||
];
|
||||
home.file = {
|
||||
".emacs.d/templates".source = ./templates;
|
||||
".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 = lib.mkDefault true;
|
||||
package = config.programs.emacs.finalPackage;
|
||||
defaultEditor = true;
|
||||
client.enable = true;
|
||||
socketActivation.enable = false;
|
||||
startWithUserSession = "graphical";
|
||||
socketActivation.enable = true;
|
||||
};
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
|
@ -35,56 +25,13 @@
|
|||
withImageMagick = true;
|
||||
withPgtk = true;
|
||||
};
|
||||
extraConfig = builtins.readFile ./init.el;
|
||||
extraPackages =
|
||||
epkgs: with epkgs; [
|
||||
# EViL Mode
|
||||
evil
|
||||
# UI and Appearance
|
||||
delight
|
||||
nerd-icons
|
||||
nerd-icons-dired
|
||||
nerd-icons-ibuffer
|
||||
nerd-icons-corfu
|
||||
# Email and Calendar
|
||||
khalel
|
||||
mu4e
|
||||
# Other (TODO sort)
|
||||
diff-hl
|
||||
org-roam
|
||||
org-journal
|
||||
org-noter
|
||||
citar
|
||||
vertico
|
||||
marginalia
|
||||
orderless
|
||||
corfu
|
||||
corfu-terminal
|
||||
cape
|
||||
consult
|
||||
consult-eglot
|
||||
tempel
|
||||
tempel-collection
|
||||
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
|
||||
python-docstring
|
||||
python-pytest
|
||||
auctex
|
||||
markdown-mode
|
||||
pandoc-mode
|
||||
scad-mode
|
||||
];
|
||||
extraConfig = ''
|
||||
(setq use-package-check-before-init t
|
||||
use-package-enable-imenu-support t
|
||||
base16-theme-distinct-fringe-background t
|
||||
base16-theme-highlight-mode-line 'contrast)
|
||||
'';
|
||||
extraPackages = epkgs: import ./packages.nix { inherit epkgs; };
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
# External requirements
|
||||
|
|
File diff suppressed because it is too large
Load diff
50
system/home/emacs/packages.nix
Normal file
50
system/home/emacs/packages.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ epkgs }:
|
||||
with epkgs;
|
||||
[
|
||||
# EViL Mode
|
||||
evil
|
||||
# UI and Appearance
|
||||
delight
|
||||
nerd-icons
|
||||
nerd-icons-dired
|
||||
nerd-icons-ibuffer
|
||||
nerd-icons-corfu
|
||||
# Email and Calendar
|
||||
khalel
|
||||
mu4e
|
||||
# Other (TODO sort)
|
||||
diff-hl
|
||||
org-roam
|
||||
org-journal
|
||||
org-noter
|
||||
citar
|
||||
vertico
|
||||
marginalia
|
||||
orderless
|
||||
corfu
|
||||
corfu-terminal
|
||||
cape
|
||||
consult
|
||||
consult-eglot
|
||||
tempel
|
||||
tempel-collection
|
||||
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
|
||||
python-docstring
|
||||
python-pytest
|
||||
auctex
|
||||
markdown-mode
|
||||
pandoc-mode
|
||||
scad-mode
|
||||
]
|
|
@ -1,16 +0,0 @@
|
|||
nix-mode
|
||||
|
||||
(fhsenv "let" n
|
||||
> "pkgs = import " (p "<nixpkgs>") " { };" n
|
||||
> "fhs = pkgs.buildFHSUserEnv {" n
|
||||
> "name = \"" (p "env") "\";" n
|
||||
> "targetPkgs = _: [ " q " ];" n
|
||||
> "profile = \"\";" n
|
||||
> "};" n
|
||||
"in" n
|
||||
> "fhs.env")
|
||||
|
||||
;; Local Variables:
|
||||
;; mode: lisp-data
|
||||
;; outline-regexp: "[a-z]"
|
||||
;; End:
|
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
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))
|
||||
|
|
10
system/home/scripts/shell/sync-emacs.sh
Normal file
10
system/home/scripts/shell/sync-emacs.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Clone ~/.config/emacs/ if it doesn't exist
|
||||
EMACS_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/emacs"
|
||||
if [ ! -d "$EMACS_DIR" ]; then
|
||||
git -C "$EMACS_DIR" pull --ff --ff-only
|
||||
else
|
||||
git clone "https://git.xenia.me.uk/pixelifytica/emacs.git" "$EMACS_DIR"
|
||||
fi
|
||||
# Cleanup legacy Emacs config file/directory
|
||||
[ -f "$HOME/.emacs" ] && rm "$HOME/.emacs"
|
||||
[ -f "$HOME/.emacs.d" ] && rm -r "$HOME/.emacs.d"
|
|
@ -13,7 +13,7 @@
|
|||
./cava.nix
|
||||
];
|
||||
home.shellAliases = {
|
||||
sync-all = "sync-git; vdirsyncer sync; mbsync -a";
|
||||
sync-all = "sync-emacs; 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";
|
||||
|
|
Loading…
Reference in a new issue