nixos/emacs: Remove absolute paths from documentation
Apart from being bad practice, absolute paths may be confusing; especially the `services.emacs.package` definition in the "Running Emacs as a service" section. Remove them. Supersedes: https://github.com/NixOS/nixpkgs/pull/192019 Co-authored-by: Alexander Bantyev <balsoft@balsoft.ru>
This commit is contained in:
parent
26dc877716
commit
13da2e9463
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user