47 lines
977 B
Nix
47 lines
977 B
Nix
{ config
|
|
, lib
|
|
, pkgs
|
|
, inputs
|
|
, ...
|
|
}:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.my.programs.emacs;
|
|
myEmacs = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages
|
|
(epkgs: [ epkgs.vterm ]));
|
|
in
|
|
{
|
|
options.my.programs.emacs.enable = mkEnableOption "emacs";
|
|
|
|
config = mkIf cfg.enable {
|
|
my.shell.aliases = {
|
|
emacs = "emacsclient -nw -a 'emacs -nw'";
|
|
};
|
|
fonts.fonts = with pkgs; [
|
|
emacs-all-the-icons-fonts
|
|
(iosevka-bin.override { variant = "aile"; })
|
|
];
|
|
users.users.moritz.packages = with pkgs; [
|
|
myEmacs
|
|
|
|
(ripgrep.override { withPCRE2 = true; })
|
|
# flyspell
|
|
(hunspellWithDicts [
|
|
hunspellDicts.en_GB-ize
|
|
hunspellDicts.en_US
|
|
hunspellDicts.de_DE
|
|
])
|
|
|
|
# language servers
|
|
nil
|
|
];
|
|
home-manager.users.moritz = {
|
|
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
|
|
services.emacs = {
|
|
enable = true;
|
|
package = myEmacs;
|
|
};
|
|
};
|
|
};
|
|
}
|