dotfiles.nix/home-manager/profiles/willem/programs/emacs/default.nix
willemml a7c69788b0
Fixes TeX module for Emacs
Adds support for changing the org and tex config file path. Also makes
extra packages needed by org and tex customizable outside of the
module definition.

Additionally this makes the launchd service for Emacs on darwin use
the finalPackge output instead of package. This improves compatibility
with existing home-manager modules as well as my additions for
controlling whether or not org and tex are configured.
2023-11-08 14:54:48 -08:00

68 lines
1.3 KiB
Nix

{
pkgs,
lib,
...
}: {
programs.emacs = {
earlyInitFile = ./early-init.el;
initFile = ./init.el;
enable = true;
package = pkgs.emacs29;
extraPackages = epkgs:
(with epkgs; let
company-mode = epkgs.trivialBuild rec {
pname = "company-mode";
version = "7c24dc8668af5aea8a5d07aeceda5fac7a2a85b5";
src = pkgs.fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "sha256-6aX2S4cUop1rdxweIF5f1qrgNmYd1mtWgT9T1Q1s2h8=";
};
};
in [
all-the-icons
all-the-icons-dired
company-mode
company-sourcekit
counsel
dash
editorconfig
edit-indirect
f
flycheck
format-all
ivy
lsp-mode
magit
magit-section
meow
nix-mode
nix-update
org
org-modern
polymode
poly-org
rustic
s
separedit
solarized-theme
swift-mode
swiper
yasnippet
])
++ (with pkgs; [
sqlite
]);
};
services.emacs = lib.mkIf pkgs.stdenv.isLinux {
enable = true;
client.enable = true;
startWithUserSession = true;
};
}