2018-03-20 17:38:26 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2019-09-28 21:00:03 +02:00
|
|
|
pkgsWithOverlay = import <nixpkgs-unstable> {
|
|
|
|
overlays = [
|
|
|
|
(import (builtins.fetchTarball {
|
2020-03-28 18:54:51 +01:00
|
|
|
url = https://github.com/nix-community/emacs-overlay/archive/403c14c23be188b58c0b1bc197b428041d8a0cea.tar.gz;
|
2019-09-28 21:00:03 +02:00
|
|
|
}))
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
#emacsWithCustomPackages
|
|
|
|
emacsPkgs= epkgs: [
|
2019-11-14 15:34:49 +01:00
|
|
|
# testing lsp mode
|
|
|
|
epkgs.melpaPackages.lsp-ui
|
|
|
|
epkgs.melpaPackages.company-lsp
|
|
|
|
epkgs.melpaPackages.lsp-treemacs
|
|
|
|
epkgs.melpaPackages.helm-lsp
|
|
|
|
epkgs.melpaPackages.dap-mode
|
|
|
|
epkgs.melpaPackages.lsp-mode
|
|
|
|
|
|
|
|
# testing
|
2019-10-21 07:42:39 +02:00
|
|
|
epkgs.melpaPackages.web-mode
|
|
|
|
epkgs.melpaPackages.js2-mode
|
|
|
|
epkgs.melpaPackages.xref-js2
|
|
|
|
|
|
|
|
epkgs.melpaPackages.academic-phrases
|
|
|
|
|
2019-09-24 05:40:40 +02:00
|
|
|
epkgs.melpaPackages.gitlab
|
2019-10-21 07:42:39 +02:00
|
|
|
epkgs.melpaPackages.weechat
|
2019-09-24 05:40:40 +02:00
|
|
|
|
2020-02-11 17:52:46 +01:00
|
|
|
# helm
|
|
|
|
epkgs.melpaPackages.helm
|
|
|
|
epkgs.melpaPackages.helm-fuzzier
|
|
|
|
epkgs.melpaPackages.helm-ag
|
|
|
|
|
|
|
|
|
2019-09-24 05:40:40 +02:00
|
|
|
# emacs convenience
|
2018-11-02 09:43:47 +01:00
|
|
|
epkgs.melpaPackages.ag
|
2019-09-11 22:58:58 +02:00
|
|
|
epkgs.melpaPackages.company
|
2019-09-24 05:40:40 +02:00
|
|
|
epkgs.melpaPackages.direnv
|
2018-07-31 16:32:39 +02:00
|
|
|
epkgs.melpaPackages.evil
|
2019-09-24 05:40:40 +02:00
|
|
|
epkgs.melpaPackages.google-this
|
|
|
|
epkgs.melpaPackages.monokai-alt-theme
|
2019-11-16 04:10:53 +01:00
|
|
|
epkgs.melpaPackages.spacemacs-theme
|
2019-11-14 15:34:49 +01:00
|
|
|
epkgs.melpaPackages.zenburn-theme
|
2019-09-24 05:40:40 +02:00
|
|
|
|
|
|
|
# development
|
2019-09-28 21:00:03 +02:00
|
|
|
epkgs.melpaPackages.magit
|
2018-03-21 08:59:35 +01:00
|
|
|
epkgs.melpaPackages.nix-mode
|
2018-03-24 11:30:30 +01:00
|
|
|
epkgs.melpaPackages.go-mode
|
2019-09-09 14:39:06 +02:00
|
|
|
epkgs.melpaPackages.haskell-mode
|
2019-09-17 09:09:00 +02:00
|
|
|
# rust
|
2018-11-02 09:43:47 +01:00
|
|
|
epkgs.melpaPackages.rust-mode
|
2019-11-14 15:34:49 +01:00
|
|
|
# epkgs.melpaPackages.flycheck-rust
|
2019-09-17 09:09:00 +02:00
|
|
|
epkgs.melpaPackages.racer
|
|
|
|
|
2019-09-24 05:40:40 +02:00
|
|
|
# python
|
2019-09-11 23:00:00 +02:00
|
|
|
epkgs.melpaPackages.elpy
|
|
|
|
|
2020-03-30 08:18:10 +02:00
|
|
|
# org-mode
|
|
|
|
epkgs.melpaPackages.org-super-agenda
|
|
|
|
epkgs.melpaPackages.org-bullets
|
|
|
|
epkgs.melpaPackages.org-ql
|
|
|
|
|
2019-09-17 09:09:00 +02:00
|
|
|
epkgs.elpaPackages.bbdb
|
2019-09-14 14:51:05 +02:00
|
|
|
epkgs.orgPackages.org-plus-contrib
|
|
|
|
epkgs.melpaPackages.smex
|
|
|
|
epkgs.melpaPackages.org-mime
|
2019-11-14 15:34:49 +01:00
|
|
|
epkgs.melpaPackages.orgit
|
|
|
|
|
2019-09-24 15:57:55 +02:00
|
|
|
epkgs.elpaPackages.which-key
|
2020-02-11 17:52:46 +01:00
|
|
|
|
|
|
|
epkgs.exwm
|
|
|
|
epkgs.melpaPackages.desktop-environment
|
|
|
|
epkgs.melpaPackages.helm-exwm
|
2019-09-28 21:00:03 +02:00
|
|
|
];
|
2019-11-14 15:34:49 +01:00
|
|
|
|
|
|
|
emacsWithOverlay = pkgsWithOverlay.emacsWithPackagesFromUsePackage {
|
2020-02-11 17:52:46 +01:00
|
|
|
config = builtins.readFile ./elisp/init.el;
|
2019-11-14 15:34:49 +01:00
|
|
|
# Package is optional, defaults to pkgs.emacs
|
|
|
|
package = pkgsWithOverlay.emacsGit;
|
|
|
|
# Optionally provide extra packages not in the configuration file
|
|
|
|
extraEmacsPackages = emacsPkgs;
|
|
|
|
};
|
2018-11-02 09:43:47 +01:00
|
|
|
|
2018-03-20 20:16:12 +01:00
|
|
|
myEmacs = pkgs.writeDashBin "my-emacs" ''
|
2020-04-14 20:42:06 +02:00
|
|
|
exec ${emacsWithOverlay}/bin/emacs -q "$@"
|
2018-03-20 20:16:12 +01:00
|
|
|
'';
|
2018-11-02 09:43:47 +01:00
|
|
|
|
|
|
|
myEmacsWithDaemon = pkgs.writeDashBin "my-emacs-daemon" ''
|
2020-04-14 20:42:06 +02:00
|
|
|
exec ${emacsWithOverlay}/bin/emacs -q --daemon
|
2018-11-02 09:43:47 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
myEmacsClient = pkgs.writeDashBin "meclient" ''
|
2019-09-28 21:00:03 +02:00
|
|
|
exec ${emacsWithOverlay}/bin/emacsclient --create-frame
|
2018-11-02 09:43:47 +01:00
|
|
|
'';
|
2018-03-20 17:38:26 +01:00
|
|
|
in {
|
|
|
|
environment.systemPackages = [
|
2020-02-11 17:52:46 +01:00
|
|
|
myEmacs myEmacsWithDaemon myEmacsClient emacsWithOverlay
|
2018-03-20 17:38:26 +01:00
|
|
|
];
|
2020-02-11 17:52:46 +01:00
|
|
|
|
2020-03-30 08:18:46 +02:00
|
|
|
## EXWM Config
|
|
|
|
# services.xserver = {
|
|
|
|
# enable = true;
|
|
|
|
# xkbOptions = "caps:super";
|
|
|
|
# exportConfiguration = true;
|
|
|
|
#
|
|
|
|
# displayManager.slim.enable = true;
|
|
|
|
# windowManager.default = "exwm";
|
|
|
|
#
|
|
|
|
# # Set up the login session
|
|
|
|
# windowManager.session = [{
|
|
|
|
# name = "exwm";
|
|
|
|
# start = "${emacsWithOverlay}/bin/emacs -q -l " + builtins.toString ./elisp/init.el;
|
|
|
|
# }];
|
|
|
|
# };
|
2018-03-20 17:38:26 +01:00
|
|
|
}
|