Merge pull request #270096 from slotThe/emacs/192019-2

nixos/emacs: Remove absolute paths from documentation
This commit is contained in:
Lin Jian 2023-12-01 01:31:04 -06:00 committed by GitHub
commit cdc1b4599f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,9 +172,9 @@ nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.orgPackages
:::
If you are on NixOS, you can install this particular Emacs for all users by
adding it to the list of system packages (see
[](#sec-declarative-package-mgmt)). Simply modify your file
{file}`configuration.nix` to make it contain:
putting the `emacs.nix` file in `/etc/nixos` and adding it to the list of
system packages (see [](#sec-declarative-package-mgmt)). Simply modify your
file {file}`configuration.nix` to make it contain:
::: {.example #module-services-emacs-configuration-nix}
### Custom Emacs in `configuration.nix`
@ -182,7 +182,7 @@ adding it to the list of system packages (see
{
environment.systemPackages = [
# [...]
(import /path/to/emacs.nix { inherit pkgs; })
(import ./emacs.nix { inherit pkgs; })
];
}
```
@ -197,8 +197,8 @@ https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides
-->
If you are not on NixOS or want to install this particular Emacs only for
yourself, you can do so by adding it to your
{file}`~/.config/nixpkgs/config.nix` (see
yourself, you can do so by putting `emacs.nix` in `~/.config/nixpkgs` and
adding it to your {file}`~/.config/nixpkgs/config.nix` (see
[Nixpkgs manual](https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides)):
::: {.example #module-services-emacs-config-nix}
### Custom Emacs in `~/.config/nixpkgs/config.nix`
@ -206,7 +206,7 @@ yourself, you can do so by adding it to your
```
{
packageOverrides = super: let self = super.pkgs; in {
myemacs = import /path/to/emacs.nix { pkgs = self; };
myemacs = import ./emacs.nix { pkgs = self; };
};
}
```
@ -264,7 +264,6 @@ To install and enable the {command}`systemd` user service for Emacs
daemon, add the following to your {file}`configuration.nix`:
```
services.emacs.enable = true;
services.emacs.package = import /home/cassou/.emacs.d { pkgs = pkgs; };
```
The {var}`services.emacs.package` option allows a custom