blob: 5bdd6d5197e4ff69936679235fc29de640957f20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
{ config, pkgs, ... }:
let
pkgsWithOverlay = import <nixpkgs-unstable> {
overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/403c14c23be188b58c0b1bc197b428041d8a0cea.tar.gz;
}))
];
};
#emacsWithCustomPackages
emacsPkgs= epkgs: [
# 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
epkgs.melpaPackages.web-mode
epkgs.melpaPackages.js2-mode
epkgs.melpaPackages.xref-js2
epkgs.melpaPackages.academic-phrases
epkgs.melpaPackages.gitlab
epkgs.melpaPackages.weechat
# helm
epkgs.melpaPackages.helm
epkgs.melpaPackages.helm-fuzzier
epkgs.melpaPackages.helm-ag
# emacs convenience
epkgs.melpaPackages.ag
epkgs.melpaPackages.company
epkgs.melpaPackages.direnv
epkgs.melpaPackages.evil
epkgs.melpaPackages.google-this
epkgs.melpaPackages.monokai-alt-theme
epkgs.melpaPackages.spacemacs-theme
epkgs.melpaPackages.zenburn-theme
# development
epkgs.melpaPackages.magit
epkgs.melpaPackages.nix-mode
epkgs.melpaPackages.go-mode
epkgs.melpaPackages.haskell-mode
# rust
epkgs.melpaPackages.rust-mode
# epkgs.melpaPackages.flycheck-rust
epkgs.melpaPackages.racer
# python
epkgs.melpaPackages.elpy
# org-mode
epkgs.melpaPackages.org-super-agenda
epkgs.melpaPackages.org-bullets
epkgs.melpaPackages.org-ql
epkgs.elpaPackages.bbdb
epkgs.orgPackages.org-plus-contrib
epkgs.melpaPackages.smex
epkgs.melpaPackages.org-mime
epkgs.melpaPackages.orgit
epkgs.elpaPackages.which-key
epkgs.exwm
epkgs.melpaPackages.desktop-environment
epkgs.melpaPackages.helm-exwm
];
emacsWithOverlay = pkgsWithOverlay.emacsWithPackagesFromUsePackage {
config = builtins.readFile ./elisp/init.el;
# Package is optional, defaults to pkgs.emacs
package = pkgsWithOverlay.emacsGit;
# Optionally provide extra packages not in the configuration file
extraEmacsPackages = emacsPkgs;
};
myEmacs = pkgs.writeDashBin "my-emacs" ''
exec ${emacsWithOverlay}/bin/emacs -q "$@"
'';
myEmacsWithDaemon = pkgs.writeDashBin "my-emacs-daemon" ''
exec ${emacsWithOverlay}/bin/emacs -q --daemon
'';
myEmacsClient = pkgs.writeDashBin "meclient" ''
exec ${emacsWithOverlay}/bin/emacsclient --create-frame
'';
in {
environment.systemPackages = [
myEmacs myEmacsWithDaemon myEmacsClient emacsWithOverlay
];
## 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;
# }];
# };
}
|