nichts/modules/programs/editors/emacs/module.nix

41 lines
762 B
Nix
Raw Normal View History

2024-09-01 21:37:24 +02:00
{
config,
lib,
pkgs,
inputs,
...
}: let
cfg = config.modules.system.programs.editors.emacs;
inherit (config.modules.other.system) username;
inherit (lib) mkIf;
# Taken from outfoxxed since figuring this out is really annoying.
2024-09-06 08:38:28 +02:00
newpkgs =
2024-09-01 21:37:24 +02:00
pkgs.appendOverlays
(with inputs.emacs-overlay.overlays; [
emacs
package
]);
custom-emacs = with newpkgs;
(emacsPackagesFor emacs-pgtk)
2024-09-01 21:37:24 +02:00
.emacsWithPackages (epkgs:
with epkgs; [
vterm
]);
2024-09-01 21:37:24 +02:00
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
home.packages = with pkgs; [
custom-emacs
clang-tools
];
2024-09-01 21:37:24 +02:00
2024-09-06 08:38:28 +02:00
services.emacs = {
2024-09-20 15:45:44 +02:00
enable = true;
2024-09-06 08:38:28 +02:00
package = custom-emacs;
};
2024-09-01 21:37:24 +02:00
};
};
}