this repo has no description
nix
1{ inputs, lib, ... }:
2{
3 flake-file.inputs.emacs-overlay = {
4 url = lib.mkDefault "github:nix-community/emacs-overlay";
5 inputs.nixpkgs.follows = lib.mkDefault "nixpkgs";
6 };
7
8 programs.emacs = {
9 darwin =
10 { pkgs, ... }:
11 {
12 nixpkgs.overlays = [ inputs.emacs-overlay.overlays.default ];
13
14 environment.systemPackages = builtins.attrValues {
15 inherit (pkgs)
16 ## Emacs
17 binutils
18 # emacs # We're using emacs-plus from Homebrew
19
20 ## Doom
21 ripgrep
22 gnutls
23
24 ## Optional
25 fd
26 imagemagick
27 pinentry-emacs
28 zstd
29
30 ## Module deps
31 # :term vterm
32 cmake
33 gcc
34 gnumake
35
36 # :tools editorconfig
37 editorconfig-core-c
38 # :lang org +roam
39 graphviz
40 sqlite
41 # :lang sh
42 shellcheck
43 shfmt
44 # :tools lsp
45 nodejs
46
47 # Seems to be needed since emacs v30
48 tree-sitter
49 ;
50
51 inherit (pkgs.emacsPackages)
52 vterm
53 ;
54 };
55
56 homebrew = {
57 taps = [ "d12frosted/emacs-plus" ];
58 brews = [
59 {
60 name = "emacs-plus";
61 args = [ "with-native-comp" ];
62 }
63 ];
64 };
65 };
66
67 homeManager =
68 { config, lib, ... }:
69 let
70 inherit (config.lib.file) mkOutOfStoreSymlink;
71 sessionVariables = {
72 DOOMDIR = "$HOME/.config/doom";
73 };
74 in
75 {
76 xdg.configFile."doom".source =
77 mkOutOfStoreSymlink "${config.home.homeDirectory}/repos/github.com/Sharparam/nix-config/dotfiles/doom/.config/doom";
78
79 # programs = {
80 # bash.initExtra = ''
81 # emacs() {
82 # pgrep emacs Emacs && emacsclient --no-wait --create-frame "$@" || emacs --no-window-system "$@"
83 # }
84 # '';
85
86 # zsh.siteFunctions = {
87 # emacs = ''
88 # pgrep emacs Emacs && emacsclient --no-wait --create-frame "$@" || emacs --no-window-system "$@"
89 # '';
90 # };
91 # };
92
93 home = {
94 inherit sessionVariables;
95
96 sessionPath = lib.mkDefault [
97 "\${XDG_CONFIG_HOME:-$HOME/.config}/emacs/bin"
98 ];
99
100 shellAliases = {
101 emacs = "emacsclient --no-wait --create-frame";
102 };
103 };
104
105 systemd.user = { inherit sessionVariables; };
106 };
107 };
108}