47 lines
956 B
Nix
47 lines
956 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 (with hunspellDicts; [
|
|
en_GB-ize
|
|
en_US
|
|
de_DE
|
|
]))
|
|
|
|
# language servers
|
|
nil
|
|
];
|
|
home-manager.users.moritz = {
|
|
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
|
|
services.emacs = {
|
|
enable = true;
|
|
package = myEmacs;
|
|
};
|
|
};
|
|
};
|
|
}
|