diff options
author | Vincent Ambo <tazjin@google.com> | 2019-12-14T11·45+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2019-12-14T11·45+0000 |
commit | 74b5054a43132580fba7e834efc4a39e013a5957 (patch) | |
tree | 655e372096e6a9a09486a16d142fbbd8e86a4882 /infra/nixos/emacs.nix | |
parent | 3071ffdc8afa83c9ddf04537943087ca71b8d097 (diff) | |
parent | 3f199f96506d2559dd51d8fff629790e057c9149 (diff) |
merge(nixos): Merge (unrelated) NixOS config history into infra/ r/132
Diffstat (limited to 'infra/nixos/emacs.nix')
-rw-r--r-- | infra/nixos/emacs.nix | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/infra/nixos/emacs.nix b/infra/nixos/emacs.nix new file mode 100644 index 000000000000..24426bc4381c --- /dev/null +++ b/infra/nixos/emacs.nix @@ -0,0 +1,138 @@ +# Derivation for Emacs pre-configured with packages that I need. +# +# TODO: Fix sly (again) + +{ pkgs }: + +with pkgs; with emacsPackagesNg; +let emacsWithPackages = (emacsPackagesNgGen emacs).emacsWithPackages; + +# As the EXWM-README points out, XELB should be built from source if +# EXWM is. +xelb = melpaBuild { + pname = "xelb"; + ename = "xelb"; + version = "0.15"; + recipe = builtins.toFile "recipe" '' + (xelb :fetcher github + :repo "ch11ng/xelb") + ''; + + packageRequires = [ cl-generic emacs ]; + + src = fetchFromGitHub { + owner = "ch11ng"; + repo = "xelb"; + rev = "b8f168b401977098fe2b30f4ca32629c0ab6eb83"; + sha256 = "1ack1h68x8ia0ji6wbhmayrakq35p5sgrrl6qvha3ns3pswc0pl9"; + }; +}; + +# EXWM pinned to a newer version than what is released due to a +# potential fix for ch11ng/exwm#425. +exwm = melpaBuild { + pname = "exwm"; + ename = "exwm"; + version = "0.19"; + recipe = builtins.toFile "recipe" '' + (exwm :fetcher github + :repo "ch11ng/exwm") + ''; + + packageRequires = [ xelb ]; + + src = fetchFromGitHub { + owner = "ch11ng"; + repo = "exwm"; + rev = "472f7cb82b67b98843f10c12e6bda9b8ae7262bc"; + sha256 = "19gflsrb19aijf2xcw7j2m658qad21nbwziw38s1h2jw66vhk8dj"; + }; +}; + +slyFixed = sly.overrideAttrs(_: { + recipe = builtins.toFile "recipe" '' +(sly :repo "joaotavora/sly" + :fetcher github + :files ("*.el" + ("lib" "lib/*") + ("contrib" "contrib/*") + "doc/*.texi" + "doc/*.info" + "doc/dir")) +''; +}); + +in emacsWithPackages(epkgs: + # Actual ELPA packages (the enlightened!) + (with epkgs.elpaPackages; [ + ace-window + avy + company + pinentry + rainbow-mode + undo-tree + which-key + ]) ++ + + # MELPA packages: + (with epkgs.melpaPackages; [ + browse-kill-ring + cargo + counsel + counsel-notmuch + dash + dash-functional + dockerfile-mode + edit-server + eglot + elixir-mode + erlang + elm-mode + exwm + go-mode + gruber-darker-theme + haskell-mode + ht + hydra + idle-highlight-mode + intero + ivy + ivy-pass + ivy-prescient + jq-mode + kotlin-mode + magit + markdown-mode + markdown-toc + meghanada + multi-term + multiple-cursors + nginx-mode + nix-mode + omnisharp + paredit + password-store + pg + pkgs.notmuch + prescient + rainbow-delimiters + restclient + rust-mode + s + slyFixed + smartparens + string-edit + swiper + telephone-line + terraform-mode + toml-mode + use-package + uuidgen + web-mode + websocket + yaml-mode + ]) ++ + + # Custom packaged Emacs packages: + [ xelb exwm ] +) |