nixos/modules/dev/editors/emacs/default.nix
2023-12-25 13:58:10 +04:00

54 lines
1.1 KiB
Nix

{
outputs,
options,
config,
lib,
pkgs,
inputs,
...
}:
with lib; let
cfg = config.modules.dev.editors.emacs;
in {
options.modules.dev.editors.emacs = {
enable = mkEnableOption false;
daemon = mkEnableOption true;
};
config = mkIf cfg.enable {
# import overlay
nixpkgs.overlays = [
inputs.emacs-overlay.overlay
];
# ues daemon
services.emacs = {
enable = cfg.daemon;
install = true;
# package = pkgs.emacs29-pgtk;
package = pkgs.emacsWithPackagesFromUsePackage {
# org mode files are borked with this right now
config = ../../../../config/emacs/init.el;
defaultInitFile = true;
package = pkgs.emacs29-pgtk;
};
};
users.users.sako.packages = with pkgs; [
# direnv
direnv
];
# home-manager.users.sako.home.file.".emacs.d" = {
# enable = true;
# source = ../../../../config/emacs;
# recursive = true;
# };
fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["JetBrainsMono"];})
jetbrains-mono
];
};
}