System/home-manager/common/programs/emacs.nix

71 lines
1.8 KiB
Nix
Raw Normal View History

2022-09-04 04:19:50 -04:00
{ config, lib, pkgs, inputs, ... }:
{
config = lib.mkMerge [
(lib.mkIf config.nathan.programs.emacs.enable (let
myAspell = pkgs.aspellWithDicts (d: [ d.en d.en-science d.en-computers ]);
in {
# Dependencies of my emacs environment
home.packages = with pkgs; [
# For markdown rendering
python39Packages.grip
# For graph generation
graphviz
sqlite
2022-10-17 16:57:10 -04:00
plantuml
# For latex editing
texlive.combined.scheme-medium
# For notifications
libnotify
# For spelling
myAspell
# For nix
rnix-lsp
manix
nix-doc
nixfmt
# For email
2022-11-04 13:52:42 -04:00
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.mu
2023-09-26 22:04:53 -04:00
meson
pkg-config
glib
# Desktop file for org-protocol
(makeDesktopItem {
name = "org-protocol";
exec = "emacsclient %u";
comment = "Org protocol";
desktopName = "org-protocol";
type = "Application";
mimeTypes = [ "x-scheme-handler/org-protocol" ];
})
2023-06-01 13:56:06 -04:00
# For format output
2023-06-07 23:57:01 -04:00
# wkhtmltopdf
2022-10-01 11:05:10 -04:00
];
programs.emacs = {
enable = true;
package = config.nathan.programs.emacs.package;
2022-11-04 13:52:42 -04:00
extraPackages = epkgs: [
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.emacsPackages.mu4e
2022-11-04 13:52:42 -04:00
epkgs.vterm
2022-11-22 22:45:00 -05:00
epkgs.pdf-tools
2023-05-11 10:38:12 -04:00
epkgs.emacsql
epkgs.emacsql-sqlite
2022-11-04 13:52:42 -04:00
];
};
2023-05-06 21:00:46 -04:00
# Set emacs as the editor
home.sessionVariables = {
EDITOR = "emacsclient -c";
VISUAL = "emacsclient -c";
2023-06-17 18:36:26 -04:00
ALTERNATE_EDITOR = "";
2023-05-06 21:00:46 -04:00
};
}))
(lib.mkIf (config.nathan.programs.emacs.enable && pkgs.stdenv.isLinux) {
home.packages = with pkgs;
[
# For flash cards
anki
];
})
];
2022-09-04 04:19:50 -04:00
}