about summary refs log tree commit diff
path: root/overlays/patches/emacs/overlay/README.org
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/patches/emacs/overlay/README.org')
-rw-r--r--overlays/patches/emacs/overlay/README.org56
1 files changed, 34 insertions, 22 deletions
diff --git a/overlays/patches/emacs/overlay/README.org b/overlays/patches/emacs/overlay/README.org
index 70ac8fce4a70..5bb0974ada65 100644
--- a/overlays/patches/emacs/overlay/README.org
+++ b/overlays/patches/emacs/overlay/README.org
@@ -7,7 +7,7 @@ To get up and running quickly, add the following lines to your =/etc/nixos/confi
 {
 # ...
 
-  services.emacs.package = pkgs.emacsUnstable;
+  services.emacs.package = pkgs.emacs-unstable;
 
   nixpkgs.overlays = [
     (import (builtins.fetchTarball {
@@ -19,7 +19,7 @@ To get up and running quickly, add the following lines to your =/etc/nixos/confi
 }
 #+END_SRC
 
-This configuration will enable this overlay, and define your system-wide emacs package as the =emacsUnstable= attribute it provides.
+This configuration will enable this overlay, and define your system-wide emacs package as the =emacs-unstable= attribute it provides.
 
 *NOTE:* Read the "Usage of the overlay" section below for further explanation of this configuration. This has the potential to break things, and will frequently trigger full source rebuilds of emacs.
 
@@ -36,34 +36,39 @@ It is recommended you read Nixpkgs and NixOS documentation on package overlays a
 
 ** Contents of the overlay
 
-*** Elpa
+This overlay consists of two overlays: =emacs= and =package=.
+
+You can use both of them as a whole overlay or only one of them.
+
+*** =package= overlay
+
+**** Elpa
 Daily generations of Elpa.
 
-*** Melpa / Melpa stable
+**** Melpa / Melpa stable
 Daily generations of Melpa & Melpa stable attribute sets.
 
-*** EXWM & needed dependencies
+**** EXWM & needed dependencies
 This overlay provides fresh versions of EXWM and dependencies. This is
 updated daily.
 
-*** Emacs from Git and latest (including pre-releases)
+*** =emacs= overlay
+
+**** Emacs from Git and latest (including pre-releases)
 This overlay also provides two versions (latest from git) for Emacs. These
 are updated daily.
 
-These attributes are named =emacsGit= and =emacsUnstable=.
-=emacsGit= is built from the latest =master= branch and =emacsUnstable= is built from the latest tag.
+These attributes are named =emacsGit= and =emacs-unstable=.
+=emacsGit= is built from the latest =master= branch and =emacs-unstable= is built from the latest tag.
 
 Emacs from git is not guaranteed stable and may break your setup at any
 time, if it breaks you get to keep both pieces.
 
-Furthermore we provide emacs compiled with the native compilation backend enabled
-under the attributes =emacsNativeComp= (built from the latest tag) and =emacsGitNativeComp= (built from the latest =master= branch).
-
-We also provide two attributes named =emacsGit-nox= and =emacsUnstable-nox=
+We also provide two attributes named =emacsGit-nox= and =emacs-unstable-nox=
 if you wish to have Emacs built without X dependencies.
-=emacsPgtk= and =emacsPgtkNativeComp= use the experimental pgtk feature which supports Wayland natively.
+=emacsPgtk= uses the experimental pgtk feature which supports Wayland natively.
 
-** Extra library functionality
+**** Extra library functionality
 This overlay comes with extra functions to generate an Emacs closure
 from various types of dependency declaration. (These are abstractions
 on top of =emacsWithPackages=.)
@@ -72,9 +77,10 @@ For example, =emacsWithPackagesFromUsePackage= adds packages which are
 required in a user's config via =use-package= or =leaf=.
 
 #+BEGIN_SRC nix
+  { pkgs, ... }:
   {
     environment.systemPackages = [
-      (emacsWithPackagesFromUsePackage {
+      (pkgs.emacsWithPackagesFromUsePackage {
         # Your Emacs config file. Org mode babel files are also
         # supported.
         # NB: Config files cannot contain unicode characters, since
@@ -83,6 +89,17 @@ required in a user's config via =use-package= or =leaf=.
         # config = ./emacs.org;
         config = ./emacs.el;
 
+        # Whether to include your config as a default init file.
+        # If being bool, the value of config is used.
+        # Its value can also be a derivation like this if you want to do some
+        # substitution:
+        #   defaultInitFile = pkgs.substituteAll {
+        #     name = "default.el";
+        #     src = ./emacs.el;
+        #     inherit (config.xdg) configHome dataHome;
+        #   };
+        defaultInitFile = true;
+
         # Package is optional, defaults to pkgs.emacs
         package = pkgs.emacsGit;
 
@@ -110,8 +127,8 @@ required in a user's config via =use-package= or =leaf=.
         ];
 
         # Optionally override derivations.
-        override = epkgs: epkgs // {
-          weechat = epkgs.melpaPackages.weechat.overrideAttrs(old: {
+        override = final: prev: {
+          weechat = prev.melpaPackages.weechat.overrideAttrs(old: {
             patches = [ ./weechat-el.patch ];
           });
         };
@@ -182,10 +199,5 @@ package directly from the overlay. For example, you can install
 ** Matrix chat
 [[https://matrix.to/#/#emacs:nixos.org][Nix Emacs]]
 
-** Nixpkgs issues
-
-*** Emacs tracking issue
-https://github.com/NixOS/nixpkgs/issues/66303
-
 #  LocalWords:  EXWM NixOS emacsGit
 #  LocalWords:  SRC nixpkgs builtins fetchTarball url