63 lines
1.6 KiB
Nix
63 lines
1.6 KiB
Nix
{ 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
|
|
plantuml
|
|
# For latex editing
|
|
texlive.combined.scheme-medium
|
|
# For notifications
|
|
libnotify
|
|
# For spelling
|
|
myAspell
|
|
# For nix
|
|
rnix-lsp
|
|
manix
|
|
nix-doc
|
|
nixfmt
|
|
# For email
|
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.mu
|
|
# 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" ];
|
|
})
|
|
];
|
|
programs.emacs = {
|
|
enable = true;
|
|
package = config.nathan.programs.emacs.package;
|
|
extraPackages = epkgs: [
|
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.mu
|
|
epkgs.vterm
|
|
epkgs.pdf-tools
|
|
];
|
|
};
|
|
# Set emacs as the editor
|
|
home.sessionVariables = {
|
|
EDITOR = "emacsclient -c";
|
|
VISUAL = "emacsclient -c";
|
|
};
|
|
}))
|
|
(lib.mkIf (config.nathan.programs.emacs.enable && pkgs.stdenv.isLinux) {
|
|
home.packages = with pkgs;
|
|
[
|
|
# For flash cards
|
|
anki
|
|
];
|
|
})
|
|
];
|
|
}
|