2020-11-09 21:26:38 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
2021-06-06 19:53:14 +00:00
|
|
|
programs.emacs = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.emacsGcc;
|
|
|
|
};
|
2021-05-28 08:05:17 +00:00
|
|
|
|
2020-12-30 20:27:39 +00:00
|
|
|
home.packages = with pkgs;
|
|
|
|
let py = python38Packages;
|
|
|
|
in [
|
|
|
|
editorconfig-core-c
|
|
|
|
black
|
|
|
|
mypy
|
|
|
|
haskell-language-server
|
|
|
|
rust-analyzer
|
|
|
|
py.python-language-server
|
|
|
|
py.pyls-isort
|
|
|
|
py.pyls-black
|
|
|
|
py.pyls-mypy
|
2021-06-06 19:53:14 +00:00
|
|
|
|
|
|
|
(pkgs.makeDesktopItem {
|
|
|
|
name = "org-protocol";
|
|
|
|
desktopName = "Emacs org-protocol handler";
|
|
|
|
exec = "emacsclient %u";
|
|
|
|
terminal = "false";
|
|
|
|
categories = "System;";
|
|
|
|
mimeType = "x-scheme-handler/org-protocol;";
|
|
|
|
})
|
2020-12-30 20:27:39 +00:00
|
|
|
];
|
2020-11-09 21:26:38 +00:00
|
|
|
|
|
|
|
home.file = let
|
2021-02-01 21:01:05 +00:00
|
|
|
doom-emacs = pkgs.fetchFromGitHub {
|
|
|
|
owner = "hlissner";
|
|
|
|
repo = "doom-emacs";
|
2021-07-16 07:48:47 +00:00
|
|
|
# branch "master" on 2021-07-09
|
|
|
|
rev = "42ff36914280a18230626f775d9da0487438e282";
|
|
|
|
sha256 = "1c03wbxnrgmyv5r08ggwln9gihvbr8hzidbwkhdgcip6bafdr6mc";
|
2020-11-09 21:26:38 +00:00
|
|
|
};
|
|
|
|
in {
|
2021-02-01 21:01:05 +00:00
|
|
|
".doom.d" = {
|
|
|
|
source = ../dotfiles/doom;
|
|
|
|
recursive = true;
|
|
|
|
};
|
2021-02-08 17:01:32 +00:00
|
|
|
".doom.d/snippets".source = ../dotfiles/emacs/snippets;
|
2020-11-09 21:26:38 +00:00
|
|
|
};
|
2021-06-06 19:53:14 +00:00
|
|
|
|
2020-11-17 17:24:51 +00:00
|
|
|
programs.firefox.profiles.default.settings = {
|
2020-11-18 20:48:40 +00:00
|
|
|
"network.protocol-handler.expose.org-protocol" = false;
|
2020-11-17 17:24:51 +00:00
|
|
|
};
|
2020-11-09 21:26:38 +00:00
|
|
|
|
2021-02-01 21:00:04 +00:00
|
|
|
programs.zsh.shellAliases = {
|
2021-06-24 19:24:29 +00:00
|
|
|
e = "emacsclient -t"; # Terminal
|
|
|
|
ew = "emacsclient -c"; # New window (and wait)
|
|
|
|
en = "emacsclient -nc"; # New window (and return immediately)
|
|
|
|
calc = "emacs -f full-calc -nw -q"; # Quick fullscreen calculator
|
2021-02-01 21:01:05 +00:00
|
|
|
|
2021-06-24 19:24:29 +00:00
|
|
|
doom = "~/.emacs.d/bin/doom";
|
2021-02-01 21:00:04 +00:00
|
|
|
};
|
|
|
|
|
2020-11-09 21:26:38 +00:00
|
|
|
services.gpg-agent.extraConfig = ''
|
2020-11-21 15:51:37 +00:00
|
|
|
allow-emacs-pinentry
|
2020-11-09 21:26:38 +00:00
|
|
|
'';
|
|
|
|
}
|