2022-04-03 16:15:45 +02:00
|
|
|
{ pkgs, ... }: let
|
|
|
|
|
|
|
|
configEl = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "config.el";
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [ emacs ];
|
|
|
|
buildPhase = ''
|
|
|
|
emacs --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "config.org")'
|
|
|
|
'';
|
2024-06-26 20:11:14 +02:00
|
|
|
|
2022-04-03 16:15:45 +02:00
|
|
|
installPhase = ''
|
|
|
|
cp config.el $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
2024-06-26 20:11:14 +02:00
|
|
|
xdg.configFile."emacs/init.el".source = configEl.outPath;
|
2022-04-03 16:15:45 +02:00
|
|
|
|
|
|
|
programs.emacs = {
|
|
|
|
enable = true;
|
|
|
|
extraPackages = epkgs: with epkgs; [
|
|
|
|
# # package
|
|
|
|
use-package
|
|
|
|
# evil
|
|
|
|
# evil-collection
|
|
|
|
# evil-nerd-commenter
|
|
|
|
# # org
|
|
|
|
# evil-org
|
|
|
|
# monokai-theme
|
|
|
|
# gruber-darker-theme
|
|
|
|
# company
|
|
|
|
# flycheck
|
|
|
|
# projectile
|
|
|
|
# yasnippet
|
|
|
|
# magit
|
|
|
|
# # recentf
|
|
|
|
# which-key
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|