nixos-config/modules/programs/emacs/default.nix

58 lines
1.4 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2021-07-29 20:21:51 +00:00
let
cfg = config.ptw.programs.emacs;
weyland-yutani = pkgs.fetchFromGitHub {
owner = "jstaursky";
repo = "weyland-yutani-theme";
rev = "e89a63a62e071180c9cdd9067679fadc3f7bf796";
sha256 = "0gxlz9b7fvbjkqxsyb4l75g7jsxyms0i1vpnb6y499hl115akcaz";
};
in {
options.ptw.programs.emacs = {
enable = lib.mkEnableOption "Configure emacs";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ emacsPgtkGcc ];
services.emacs.package = pkgs.emacsPgtkGcc;
2021-08-31 16:01:29 +00:00
home-manager.users."${config.ptw.system.singleUser}" = {
home.file = {
".emacs".source = ./dotemacs;
".emacs.d/mu4e.el".source = ./mu4e.el;
".emacs.d/themes/weyland-yutani-theme.el".source = "${weyland-yutani}/weyland-yutani-theme.el";
};
programs.emacs = {
enable = true;
extraPackages = epkgs: with epkgs; [
use-package
rainbow-delimiters
hl-todo
nlinum
ivy
evil
evil-collection
highlight-parentheses
smartparens
undo-tree
perspective
pkgs.mu
org
org-present
graphviz-dot-mode
tide
nix-mode
go-mode
json-mode
rust-mode
2021-11-22 19:55:04 +00:00
yaml-mode
2022-01-01 21:04:44 +00:00
lsp-mode lsp-treemacs flycheck company
dart-mode lsp-dart
];
};
};
2021-07-29 20:21:51 +00:00
};
}