dotfiles/modules/programs/emacs.nix

45 lines
859 B
Nix

{ config
, lib
, pkgs
, inputs
, ...
}:
with lib;
let
cfg = config.my.programs.emacs;
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 = pkgs.myEmacs;
};
};
};
}