mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-09 12:57:26 -05:00
Improve docs
This commit is contained in:
11
README.md
11
README.md
@ -1,4 +1,4 @@
|
||||
| readme | [reference](./docs/reference.md)| [faq](./docs/faq.md) |
|
||||
<table><tr><th>**readme**</th><th>[reference](./docs/reference.md)</th><th>[faq](./docs/faq.md)</th></tr></table>
|
||||
|
||||
# nix-doom-emacs
|
||||
|
||||
@ -8,8 +8,7 @@
|
||||
| Dependency updater | [](https://github.com/nix-community/nix-doom-emacs/actions/workflows/update-dependencies.yml?query=branch%3Amaster) |
|
||||
| Matrix Chat | [](https://matrix.to/#/#doom-emacs:nixos.org) |
|
||||
|
||||
nix-doom-emacs (abbreviated as NDE) provides a customisable Nix derivation for [Doom Emacs](https://github.com/doomemacs/doomemacs)
|
||||
The project has lots of moving pieces and hacks. Users are expected to know their way around using (and especially debugging) Nix and Emacs Lisp in order to use this project.
|
||||
nix-doom-emacs (abbreviated as NDE) provides a customisable Nix derivation for [Doom Emacs](https://github.com/doomemacs/doomemacs).
|
||||
|
||||
The expression builds a `doom-emacs` distribution with dependencies
|
||||
pre-installed based on an existing `~/.doom.d` directory.
|
||||
@ -30,9 +29,9 @@ Pick which setup you're using here (if you're not using NixOS or Home-Manager, t
|
||||
| --- | --- | --- |
|
||||
| [Flake + Home-Manager](./docs/reference.md#home-manager) | [NixOS](./docs/reference.md#nixos) | [Standalone](./docs/reference.md#standalone) |
|
||||
|
||||
|
||||
# Hacking
|
||||
|
||||
This project is licensend under MIT. Only bugs should be filed in our [issue tracker](https://github.com/nix-community/nix-doom-emacs/issues).
|
||||
The `PR wanted` label is for issues that we'd appreciate PRs for the most.
|
||||
This project is under MIT license. Our [issue tracker](https://github.com/nix-community/nix-doom-emacs/issues) has some open issues,
|
||||
the `PR wanted` label is for issues that need PRs to fix them.
|
||||
Also, talk to us in the [Matrix Chat](https://matrix.to/#/#doom-emacs:nixos.org) to discuss ideas for future improvements.
|
||||
Contributions are welcome.
|
||||
|
@ -1,4 +1,4 @@
|
||||
| [readme](/README.md) | [reference](./reference.md)| faq |
|
||||
<table><tr><th>[readme](../README.md)</th><th>[reference](./reference.md)</th><th>**faq**</th></tr></table>
|
||||
|
||||
# Frequently Asked Questions
|
||||
|
||||
@ -54,7 +54,6 @@ programs.doom-emacs = {
|
||||
|
||||
You shouldn't do that. nix-doom-emacs' home-manager module writes `~/.emacs.d` in your `$HOME`. Make sure to remove the environment variables from your configuration, then reboot after rebuilding it. If for just the session, you can just `unset` those 2 variables.
|
||||
|
||||
## It erros with "Too many files open"!
|
||||
## It errors with "Too many files open"!
|
||||
|
||||
Running `ulimit -S -n 2048` will fix it for the duration of your shell session.
|
||||
For a more permanent solution, NixOS has [`security.pam.loginLimits`](https://search.nixos.org/options?channel=22.05&from=0&size=50&sort=relevance&type=packages&query=security.pam.loginLimits)
|
||||
|
@ -1,4 +1,4 @@
|
||||
| [readme](/README.md) | reference | [faq](./faq.md) |
|
||||
<table><tr><th>[readme](../README.md)</th><th>**reference**</th><th>[faq](./faq.md)</th></tr></table>
|
||||
|
||||
# nix-doom-emacs reference
|
||||
|
||||
@ -91,7 +91,7 @@ in {
|
||||
{
|
||||
environment.systemPackages =
|
||||
let
|
||||
doom-emacs = inputs.nix-doom-emacs.packages.${system}.defaut.override {
|
||||
doom-emacs = inputs.nix-doom-emacs.packages.${system}.default.override {
|
||||
doomPrivateDir = ./doom.d;
|
||||
};
|
||||
in [
|
||||
@ -105,7 +105,7 @@ in {
|
||||
}
|
||||
```
|
||||
|
||||
For what it's worth, you can see all overridable parameters of nix-doom-emacs in [default.nix](../default.nix).
|
||||
You can see all overridable parameters of nix-doom-emacs in [default.nix](../default.nix).
|
||||
|
||||
## Standalone
|
||||
|
||||
@ -159,9 +159,10 @@ pkgs.mkShell {
|
||||
# Setup
|
||||
|
||||
## Emacs daemon
|
||||
|
||||
If you use the Home-Manager module, you can enable it via `services.emacs.enable = true;`. The Home-Manager module will do the rest for you.
|
||||
|
||||
If you're not, and you're using a standalone method (NixOS only without home-manager/nix-darwin) instead, you'll need:
|
||||
If you're not, and you're using a standalone method (NixOS/nix-darwin without Home-Manager) instead, you'll need:
|
||||
|
||||
```nix
|
||||
services.emacs = {
|
||||
@ -174,19 +175,19 @@ services.emacs = {
|
||||
|
||||
You can now run `emacsclient -c` to connect to the daemon.
|
||||
|
||||
## Custom Emacs derivations (i.e., pgtk, nativeComp)
|
||||
## Custom Emacs derivations (i.e., PGTK, NativeComp)
|
||||
|
||||
You can use the `emacsPackage` attribute after applying `emacs-overlay` to your Nixpkgs:
|
||||
If you're using the Home-Manager module, you can use the `emacsPackage` attribute after applying `emacs-overlay` to your nixpkgs:
|
||||
|
||||
```nix
|
||||
programs.doom-emacs = {
|
||||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
doomPrivateDir = ./doom.d;
|
||||
emacsPackage = pkgs.emacsPgtkNativeComp;
|
||||
}
|
||||
```
|
||||
|
||||
For Non-HM:
|
||||
For standalone usage with Flakes:
|
||||
|
||||
```nix
|
||||
let
|
||||
@ -200,7 +201,8 @@ in {
|
||||
}
|
||||
```
|
||||
|
||||
And for Non-Flake:
|
||||
And for non-Flakes usage:
|
||||
|
||||
```nix
|
||||
let
|
||||
# ...
|
||||
@ -223,13 +225,15 @@ To update your Doom Emacs config, you simply rebuild your configuration. For exa
|
||||
In an imperative environment, Doom updates can break Emacs with no easy way to roll back.
|
||||
nix-doom-emacs moves the moving parts of your Emacs installation into the Nix build sandbox.
|
||||
|
||||
## trivialBuild and co
|
||||
## Building third-party Emacs packages
|
||||
|
||||
Though beyond the scope of this document, [`trivialBuild`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/emacs/trivial.nix) is a Nixpkgs function to trivially build Emacs packages, if you're confused about it's usage here. You can use it to build e.g. local packages or packages hosted on Git repositories. It is not a nix-doom-emacs tool. It's also in a family of functions in Nixpkgs which are made to build Emacs packages. Such as:
|
||||
Though beyond the scope of this document, [`trivialBuild`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/emacs/trivial.nix) is a nixpkgs function to trivially build Emacs packages. You can use it to build e.g. local packages or packages hosted on Git repositories. There is also a family of functions in nixpkgs which are made to build Emacs packages, such as:
|
||||
|
||||
[`generic`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/emacs/generic.nix): This is the "base" function which all the other build functions are derived from.
|
||||
- [`generic`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/emacs/generic.nix): This is the "base" function which all the other build functions are derived from
|
||||
- [`elpaBuild`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/emacs/elpa.nix): For ELPA packages
|
||||
- [`melpaBuild`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/emacs/elpa.nix): For MELPA packages
|
||||
|
||||
[`elpaBuild`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/emacs/elpa.nix), and [`melpaBuild`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/emacs/elpa.nix): Those are self-explanatory. To find examples of how they're used, you'll unfortunately have to [search Nixpkgs](https://github.com/NixOS/nixpkgs/search) for them. Luckily, the way they're used in Nixpkgs is very simple.
|
||||
To find examples of how they're used, try to [search nixpkgs](https://github.com/NixOS/nixpkgs/search) for usages of them.
|
||||
|
||||
# Support
|
||||
|
||||
|
Reference in New Issue
Block a user