https://github.com/utdemir/emacs-with-config
A Nix function for customizing Emacs
https://github.com/utdemir/emacs-with-config
emacs nix
Last synced: 2 months ago
JSON representation
A Nix function for customizing Emacs
- Host: GitHub
- URL: https://github.com/utdemir/emacs-with-config
- Owner: utdemir
- Created: 2019-07-15T07:48:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-14T03:03:41.000Z (about 5 years ago)
- Last Synced: 2025-03-25T02:01:35.296Z (3 months ago)
- Topics: emacs, nix
- Language: Emacs Lisp
- Homepage:
- Size: 5.86 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# emacs-with-config
**Deprecated**: Much better & maintained version is here: https://github.com/nix-community/emacs-overlay
This function will give you an Emacs derivation which loads the given
script alongside with all the packages mentioned in it via `use-package`.* default.nix:
```
let
pkgs = import {};
emacsWithConfig = pkgs.callPackage
(builtins.fetchTarball "https://github.com/utdemir/emacs-with-config/archive/master.tar.gz")
{};
in
emacsWithConfig ./emacs.el
```* emacs.el:
```
(require 'use-package)(use-package undo-tree
:defer 2
:init
(setq undo-tree-visualizer-timestamps t)
:config
(global-undo-tree-mode))(use-package magit
:bind
("C-x m" . magit-status))
```To be more precise, it will:
1. Parse the given script to find the `use-package` usages and collect
the required packages.
2. Use `pkgs.emacsWithPackages` to get an emacs distribution with
the required packages.
3. Bytecompile the given script.
4. Wrap `pkgs.emacs` to load the given script by default.