2023-09-04 12:59:43 +04:00
|
|
|
{
|
2023-09-16 11:52:57 +04:00
|
|
|
outputs,
|
|
|
|
options,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
2023-12-25 13:27:36 +04:00
|
|
|
inputs,
|
2023-09-16 11:52:57 +04:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.modules.dev.editors.emacs;
|
|
|
|
in {
|
2023-09-04 12:59:43 +04:00
|
|
|
options.modules.dev.editors.emacs = {
|
|
|
|
enable = mkEnableOption false;
|
2023-12-24 15:52:42 +04:00
|
|
|
daemon = mkEnableOption true;
|
2023-09-04 12:59:43 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2023-12-25 13:27:36 +04:00
|
|
|
# import overlay
|
|
|
|
nixpkgs.overlays = [
|
2023-12-25 13:32:17 +04:00
|
|
|
inputs.emacs-overlay.overlay
|
2023-12-25 13:27:36 +04:00
|
|
|
];
|
|
|
|
|
2023-10-05 07:37:12 +04:00
|
|
|
# ues daemon
|
2023-10-04 10:15:12 +04:00
|
|
|
services.emacs = {
|
2023-12-24 15:52:42 +04:00
|
|
|
enable = cfg.daemon;
|
2023-10-04 10:24:23 +04:00
|
|
|
install = true;
|
2023-12-25 13:26:44 +04:00
|
|
|
# package = pkgs.emacs29-pgtk;
|
|
|
|
package = pkgs.emacsWithPackagesFromUsePackage {
|
2023-12-25 13:50:02 +04:00
|
|
|
config = ../../../../config/emacs/init.el;
|
2023-12-25 13:46:06 +04:00
|
|
|
|
2023-12-25 13:43:17 +04:00
|
|
|
defaultInitFile = true;
|
2023-12-25 13:26:44 +04:00
|
|
|
|
2023-12-25 13:46:06 +04:00
|
|
|
package = pkgs.emacs29-pgtk;
|
2023-12-25 13:26:44 +04:00
|
|
|
|
|
|
|
};
|
2023-10-04 10:15:12 +04:00
|
|
|
};
|
2023-09-04 12:59:43 +04:00
|
|
|
users.users.sako.packages = with pkgs; [
|
2023-10-05 07:37:12 +04:00
|
|
|
# direnv
|
2023-09-04 12:59:43 +04:00
|
|
|
direnv
|
|
|
|
];
|
2023-12-25 13:34:01 +04:00
|
|
|
# home-manager.users.sako.home.file.".emacs.d" = {
|
|
|
|
# enable = true;
|
|
|
|
# source = ../../../../config/emacs;
|
|
|
|
# recursive = true;
|
|
|
|
# };
|
2023-12-23 21:39:52 +04:00
|
|
|
fonts.packages = with pkgs; [
|
2023-09-16 11:52:57 +04:00
|
|
|
(nerdfonts.override {fonts = ["JetBrainsMono"];})
|
2023-10-05 07:37:12 +04:00
|
|
|
jetbrains-mono
|
2023-09-05 13:41:34 +04:00
|
|
|
];
|
2023-09-04 12:59:43 +04:00
|
|
|
};
|
|
|
|
}
|