diff options
Diffstat (limited to 'modules/workstation/emacs/default.nix')
-rw-r--r-- | modules/workstation/emacs/default.nix | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/modules/workstation/emacs/default.nix b/modules/workstation/emacs/default.nix new file mode 100644 index 000000000000..fa26e98ce64e --- /dev/null +++ b/modules/workstation/emacs/default.nix @@ -0,0 +1,82 @@ +{ config, pkgs, ... }: + +let + emacs = ((with pkgs; emacsPackagesFor (emacs29-pgtk.overrideAttrs ( + { patches ? [], ... }: + { + patches = patches ++ [ + (fetchpatch { + url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=e4e89e2cb663c730fd563d89228fe3a9a34e63e5"; + hash = "sha256-/7vWMFXjmmmTg6nNvEPOM3LkZ+j3IVV9W127anx5deI="; + }) + ]; + } + ))).emacsWithPackages (epkgs: with epkgs; [ + adoc-mode + cmake-mode + code-review + csharp-mode + d-mode + direnv + dockerfile-mode + dts-mode + ebuild-mode + editorconfig + eglot + elpher + execline + forge + gn-mode + gnuplot-mode + go-mode + graphql-mode + graphviz-dot-mode + groovy-mode + haskell-mode + jam-mode + just-mode + kotlin-mode + lua-mode + magit + markdown-mode + meson-mode + monokai-theme + mutt-mode + ninja-mode + nix-mode + notmuch + org-roam + pass + pod-mode + protobuf-mode + rainbow-delimiters + rust-mode + sdlang-mode + sort-words + toml-mode + tuareg + typescript-mode + udev-mode + vala-mode + yaml-mode + zig-mode + ])); +in + +{ + environment.systemPackages = [ emacs ]; + + systemd.tmpfiles.rules = [ + "d ${config.users.users.qyliss.home}/notes 0700 qyliss qyliss" + ]; + + users.users.qyliss.xdg.config.paths."emacs" = pkgs.runCommand ".emacs.d" { + nativeBuildInputs = [ emacs ]; + } '' + cp ${./early-init.el} early-init.el + cp ${./init.el} init.el + emacs -L . --batch -f batch-byte-compile *.el + install -d $out + install *.el *.elc $out + ''; +} |