2021-11-01 20:33:21 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2021-07-29 20:21:51 +00:00
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
let
|
|
|
|
cfg = config.ptw.programs.emacs;
|
2021-11-06 17:48:40 +00:00
|
|
|
|
|
|
|
weyland-yutani = pkgs.fetchFromGitHub {
|
|
|
|
owner = "jstaursky";
|
|
|
|
repo = "weyland-yutani-theme";
|
|
|
|
rev = "e89a63a62e071180c9cdd9067679fadc3f7bf796";
|
|
|
|
sha256 = "0gxlz9b7fvbjkqxsyb4l75g7jsxyms0i1vpnb6y499hl115akcaz";
|
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
in {
|
|
|
|
options.ptw.programs.emacs = {
|
|
|
|
enable = lib.mkEnableOption "Configure emacs";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
2021-11-04 18:51:49 +00:00
|
|
|
environment.systemPackages = with pkgs; [ emacsPgtkGcc ];
|
2021-11-01 20:33:21 +00:00
|
|
|
services.emacs.package = pkgs.emacsPgtkGcc;
|
2021-08-31 16:01:29 +00:00
|
|
|
|
2021-11-06 17:48:40 +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
|
2021-11-06 17:48:40 +00:00
|
|
|
];
|
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
};
|
2021-07-29 20:21:51 +00:00
|
|
|
};
|
|
|
|
}
|