~vdemeester/home

ref: c353d668acfc664f9baeee17d925f3f6b858d04c home/users/vincent/dev/emacs.nix -rw-r--r-- 3.0 KiB
c353d668Vincent Demeester emacs: add htmlize a month ago
                                                                                
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Note: this file is autogenerated from an org-mode file.
{ config, lib, pkgs, ... }:

with lib;
let
  capture = pkgs.writeScriptBin "capture" ''
    #!${pkgs.stdenv.shell}
    emacsclient -s /run/user/1000/emacs/org -n -F '((name . "capture") (width . 150) (height . 90))' -e '(org-capture)'
  '';
  e = pkgs.writeScriptBin "e" ''
    #!${pkgs.stdenv.shell}
    emacs --dump-file=~/.config/emacs/emacs.pdmp $@
  '';
  et = pkgs.writeScriptBin "et" ''
    #!${pkgs.stdenv.shell}
    emacsclient -s /run/user/1000/emacs/org --tty $@
  '';
  ec = pkgs.writeScriptBin "ec" ''
    #!${pkgs.stdenv.shell}
    emacsclient -s /run/user/1000/emacs/org --create-frame $@
  '';
  myExtraPackages = epkgs: with epkgs; [
    ace-window
    aggressive-indent
    async
    avy
    bbdb
    beginend
    color-identifiers-mode
    company
    company-emoji
    company-go
    dash
    delight
    diredfl
    dired-collapse
    dired-narrow
    dired-rsync
    dired-subtree
    dockerfile-mode
    dumb-jump
    easy-kill
    edit-indirect
    envrc
    esh-autosuggest
    eshell-prompt-extras
    esup
    expand-region
    flimenu
    # replace with flymake
    flycheck
    flycheck-golangci-lint
    git-annex
    git-commit
    gitattributes-mode
    gitconfig-mode
    github-review
    gitignore-mode
    go-mode
    gotest
    goto-last-change
    hardhat
    helpful
    highlight
    highlight-indentation
    htmlize
    ibuffer-vc
    icomplete-vertical
    json-mode
    magit
    magit-annex
    magit-popup
    magit-todos
    markdown-mode
    minions
    modus-operandi-theme
    moody
    mwim
    nix-buffer
    nix-mode
    nixpkgs-fmt
    no-littering
    ob-async
    ob-go
    ob-http
    orderless
    org-capture-pop-frame
    org-journal
    org-plus-contrib
    org-ql
    org-roam
    org-super-agenda
    org-tree-slide
    org-web-tools
    orgit
    ox-pandoc
    pandoc-mode
    pdf-tools
    pkgs.bookmark-plus
    pkgs.dired-plus
    projectile
    python-mode
    rainbow-delimiters
    rainbow-mode
    rg
    ripgrep
    scratch
    shr-tag-pre-highlight
    smartparens
    symbol-overlay
    trashed
    try
    undo-tree
    use-package
    visual-fill-column
    visual-regexp
    vterm
    web-mode
    wgrep
    whole-line-or-region
    with-editor
    xterm-color
    yaml-mode
  ];
in
{
  home.file.".local/share/applications/org-protocol.desktop".source = ./emacs/org-protocol.desktop;
  home.file.".local/share/applications/ec.desktop".source = ./emacs/ec.desktop;
  home.file.".local/share/applications/capture.desktop".source = ./emacs/capture.desktop;
  home.packages = with pkgs; [
    ditaa
    graphviz
    pandoc
    sqlite
    zip
    # See if I can hide this under an option
    capture
    e
    ec
    et
  ];
  programs.emacs = {
    enable = true;
    package = pkgs.my.emacs;
    extraPackages = myExtraPackages;
  };
  services.emacs-server = {
    enable = true;
    package = pkgs.my.emacs;
    name = "org";
    shell = pkgs.zsh + "/bin/zsh -i -c";
  };
  home.sessionVariables = {
    EDITOR = "emacs";
    ALTERNATE_EDITOR = "emacs -nw";
  };
}