dotfiles/modules/programs/emacs.nix

47 lines
956 B
Nix
Raw Normal View History

2022-07-15 13:11:54 +02:00
{ config
, lib
, pkgs
, inputs
, ...
}:
2021-09-09 21:55:28 +02:00
2022-03-30 10:55:57 +02:00
with lib;
2021-09-09 21:55:28 +02:00
let
2022-07-15 13:11:54 +02:00
cfg = config.my.programs.emacs;
2022-12-23 12:39:07 +01:00
myEmacs = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages
2022-07-15 13:11:54 +02:00
(epkgs: [ epkgs.vterm ]));
in
{
2022-10-15 20:00:09 +02:00
options.my.programs.emacs.enable = mkEnableOption "emacs";
2022-07-15 13:11:54 +02:00
config = mkIf cfg.enable {
my.shell.aliases = {
2022-12-23 12:39:07 +01:00
emacs = "emacsclient -nw -a 'emacs -nw'";
2022-07-15 13:11:54 +02:00
};
2022-12-23 12:39:07 +01:00
fonts.fonts = with pkgs; [
emacs-all-the-icons-fonts
(iosevka-bin.override { variant = "aile"; })
];
users.users.moritz.packages = with pkgs; [
2022-10-06 20:32:21 +02:00
myEmacs
(ripgrep.override { withPCRE2 = true; })
2022-12-23 12:39:07 +01:00
# flyspell
2023-01-27 11:41:06 +01:00
(hunspellWithDicts (with hunspellDicts; [
en_GB-ize
en_US
de_DE
]))
2021-09-10 14:00:56 +02:00
2022-12-23 12:39:07 +01:00
# language servers
nil
2022-10-06 20:32:21 +02:00
];
home-manager.users.moritz = {
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
services.emacs = {
enable = true;
package = myEmacs;
};
2022-03-23 12:41:04 +01:00
};
2021-09-09 21:55:28 +02:00
};
}