nix-doom-emacs isn't Nix-Doom-Emacs

This commit is contained in:
Mon Aaraj
2022-09-13 00:55:20 +03:00
parent 9f5910542f
commit c3fc23c8ed
3 changed files with 15 additions and 15 deletions

View File

@ -19,15 +19,15 @@ compatible with the `doom-emacs` requirements.
# Quick Start # Quick Start
If you want to get a taste of Nix-Doom-Emacs, you can run: If you want to get a taste of nix-doom-emacs, you can run:
``` ```
$ nix run github:nix-community/nix-doom-emacs $ nix run github:nix-community/nix-doom-emacs
``` ```
Which will run Nix-Doom-Emacs with an example configuration. Which will run nix-doom-emacs with an example configuration.
Continue to [the documentation](./docs) to learn how to customise your setup further to your needs. Continue to [the documentation](./docs) to learn how to customise your setup further to your needs.
# Documentation # Documentation
To know how to use Nix-Doom-Emacs, and to fix other issues, check the [documentation](./docs) To know how to use nix-doom-emacs, and to fix other issues, check the [documentation](./docs)

View File

@ -1,16 +1,16 @@
# Documentation for Nix-Doom-Emacs # Documentation for nix-doom-emacs
Nix-Doom-Emacs (also commonly referred to as NDE in chatrooms) is a project with lots of moving pieces and hacks. Users are expected to know their way around using (and especially debugging) Nix and Emacs Lisp before using this project. nix-doom-emacs (also commonly referred to as NDE in chatrooms) is a project with lots of moving pieces and hacks. Users are expected to know their way around using (and especially debugging) Nix and Emacs Lisp before using this project.
If you encounter any issues that make it unusable to you (or if you need support), please talk to us first in the [Matrix room](https://matrix.to/#/#doom-emacs:nixos.org) and if it's indeed a bug of Nix-Doom-Emacs, file it in the [issue tracker](https://github.com/nix-community/nix-doom-emacs/issues). If you encounter any issues that make it unusable to you (or if you need support), please talk to us first in the [Matrix room](https://matrix.to/#/#doom-emacs:nixos.org) and if it's indeed a bug of nix-doom-emacs, file it in the [issue tracker](https://github.com/nix-community/nix-doom-emacs/issues).
If you find this documentation unclear or incomplete, please let us know as well. If you find this documentation unclear or incomplete, please let us know as well.
Here's the [FAQ](./faq.md) Here's the [FAQ](./faq.md)
Nix-Doom-Emacs uses [`nix-straight.el`](https://github.com/nix-community/nix-straight.el) under the hood to install dependencies. It's a low level wrapper to add Nix integration over [`straight.el`](https://github.com/radian-software/straight.el), the declarative package manager used by Doom Emacs. nix-doom-emacs uses [`nix-straight.el`](https://github.com/nix-community/nix-straight.el) under the hood to install dependencies. It's a low level wrapper to add Nix integration over [`straight.el`](https://github.com/radian-software/straight.el), the declarative package manager used by Doom Emacs.
Before using Nix-Doom-Emacs, make sure to read [`nix-straight.el`'s README'](https://github.com/nix-community/nix-straight.el), and that you understand the consequences. Before using nix-doom-emacs, make sure to read [`nix-straight.el`'s README'](https://github.com/nix-community/nix-straight.el), and that you understand the consequences.
# Getting Started # Getting Started
@ -111,7 +111,7 @@ in {
} }
``` ```
For what it's worth, you can see all overridable parameters of Nix-Doom-Emacs in [default.nix](../default.nix). For what it's worth, you can see all overridable parameters of nix-doom-emacs in [default.nix](../default.nix).
## Standalone ## Standalone

View File

@ -7,7 +7,7 @@ Nope! Doom Emacs is still perfectly usable imperatively. In fact, the very autho
## OK, I put your snippets into my NixOS configuration, and I put my Doom Emacs configuration as well. How do I `doom sync`? ## OK, I put your snippets into my NixOS configuration, and I put my Doom Emacs configuration as well. How do I `doom sync`?
To update your Doom Emacs config, you simply rebuild your configuration. For example, in NixOS you can use `nixos-rebuild switch` (or `home-manager switch` if you use Home-Manager standalone). Nix-Doom-Emacs will do everything else for you. To update your Doom Emacs config, you simply rebuild your configuration. For example, in NixOS you can use `nixos-rebuild switch` (or `home-manager switch` if you use Home-Manager standalone). nix-doom-emacs will do everything else for you.
## How do I install my favourite package? ## How do I install my favourite package?
@ -97,7 +97,7 @@ idris2-repl.el:29:2: Error: Cannot open load file: No such file or directory, pr
The way to fix it is by just adding the dependency it's complaining about. The way to fix it is by just adding the dependency it's complaining about.
Though, not all packages will complain very clearly about missing dependencies or really any issue. The best way to know how to get around this is to know how to debug Nix packages and derivations. Tools like `nix build`, `nix repl`, and `nix log` are your friend. Especially if you want to debug another person's configuration, or your own Nix-Doom-Emacs configuration without needing to `nixos-rebuild` it, then `nix build` is very useful. Though, not all packages will complain very clearly about missing dependencies or really any issue. The best way to know how to get around this is to know how to debug Nix packages and derivations. Tools like `nix build`, `nix repl`, and `nix log` are your friend. Especially if you want to debug another person's configuration, or your own nix-doom-emacs configuration without needing to `nixos-rebuild` it, then `nix build` is very useful.
For an example, if a person is using Home-Manager+NixOS, then you can build their configuration via `nix build $CONFIG_PATH_HERE#nixosConfigurations.nixos.config.home-manager.users.$USER_HERE.programs.doom-emacs.package`. You need to replace `$CONFIG_PATH_HERE` with the path (like `.` if it's in the current directory), and `$USER_HERE` with the user. This could fail, and if it does, it'll tell you to use the `nix log` command to look at the full log. This will be important. For an example, if a person is using Home-Manager+NixOS, then you can build their configuration via `nix build $CONFIG_PATH_HERE#nixosConfigurations.nixos.config.home-manager.users.$USER_HERE.programs.doom-emacs.package`. You need to replace `$CONFIG_PATH_HERE` with the path (like `.` if it's in the current directory), and `$USER_HERE` with the user. This could fail, and if it does, it'll tell you to use the `nix log` command to look at the full log. This will be important.
@ -122,7 +122,7 @@ You can now run `emacsclient -c` to connect to the daemon.
## What is `trivialBuild`? ## What is `trivialBuild`?
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. 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. 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:
[`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.
@ -130,15 +130,15 @@ Though beyond the scope of this document, [`trivialBuild`](https://github.com/Ni
For what it's worth, this will not be the last time you muddle around in the Nixpkgs code to understand how to use something. The NixOS project is known to have very bad documentation, and unfortunately the code may be your only way to understand some things. For what it's worth, this will not be the last time you muddle around in the Nixpkgs code to understand how to use something. The NixOS project is known to have very bad documentation, and unfortunately the code may be your only way to understand some things.
## Help! Nix-Doom-Emacs isn't working if I set DOOMDIR or EMACSDIR ## Help! nix-doom-emacs isn't working if I set DOOMDIR or EMACSDIR
You shouldn't do that. The only thing that Nix-Doom-Emacs writes in your $HOME is `~/.emacs.d/init.el`, which points to the Nix store. Make sure to remove them from your configuration, then reboot after rebuilding it. If for just the session, you can just `unset` those 2 variables. You shouldn't do that. The only thing that nix-doom-emacs writes in your $HOME is `~/.emacs.d/init.el`, which points to the Nix store. Make sure to remove them from your configuration, then reboot after rebuilding it. If for just the session, you can just `unset` those 2 variables.
## Help! on MacOS, it says "Too many files open"! ## Help! on MacOS, it says "Too many files open"!
Running `ulimit -S -n 2048` will fix it for the duration of your shell session. Running `ulimit -S -n 2048` will fix it for the duration of your shell session.
## How do I use emacs-overlay's emacs with Nix-Doom-Emacs? ## How do I use emacs-overlay's emacs with nix-doom-emacs?
This is very simple. you just use the `emacsPackage` attribute after applying `emacs-overlay` to your Nixpkgs. something like: This is very simple. you just use the `emacsPackage` attribute after applying `emacs-overlay` to your Nixpkgs. something like: