nix-dotfiles/home/programs/emacs/default.nix

42 lines
782 B
Nix
Raw Normal View History

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")'
'';
2022-04-03 16:15:45 +02:00
installPhase = ''
cp config.el $out
'';
};
in {
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
];
};
}