mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
docs: update session-vars info about fish shell
The docs implied that fish was not really supported, but if fish is managed by Home Manager, the generated config does use fenv to source the session-vars file. Update the installation instructions and FAQ to mention that fish does work, and mention fenv in the README.
This commit is contained in:
parent
bd747c5a53
commit
2952168ed5
3 changed files with 17 additions and 8 deletions
|
@ -107,9 +107,8 @@ Currently the easiest way to install Home Manager is as follows:
|
|||
$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
```
|
||||
|
||||
file in your shell configuration. Unfortunately, in this specific
|
||||
case we currently only support POSIX.2-like shells such as
|
||||
[Bash][] or [Z shell][].
|
||||
file in your shell configuration. This file can be sourced
|
||||
directly by POSIX.2-like shells such as [Bash][] or [Z shell][].
|
||||
|
||||
For example, if you use Bash then add
|
||||
|
||||
|
@ -124,7 +123,9 @@ Currently the easiest way to install Home Manager is as follows:
|
|||
. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh"
|
||||
```
|
||||
|
||||
to your `~/.profile` file.
|
||||
to your `~/.profile` file. For fish shell, it is possible to use
|
||||
[foreign-env](https://github.com/oh-my-fish/plugin-foreign-env) to
|
||||
source the file.
|
||||
|
||||
If instead of using channels you want to run Home Manager from a Git
|
||||
checkout of the repository then you can use the
|
||||
|
|
|
@ -43,15 +43,21 @@ The solution is typically to uninstall the package from the environment using `n
|
|||
You could also opt to unistall _all_ of the packages from your profile with `nix-env --uninstall '*'`.
|
||||
|
||||
=== Why are the session variables not set?
|
||||
:foreign-env: https://github.com/oh-my-fish/plugin-foreign-env
|
||||
|
||||
Home Manager is only able to set session variables automatically if it manages your Bash or Z shell configuration. If you don't want to let Home Manager manage your shell then you will have to manually source the `~/.nix-profile/etc/profile.d/hm-session-vars.sh` file in an appropriate way. In Bash and Z shell this can be done by adding
|
||||
Home Manager is only able to set session variables automatically if it manages your Bash, Z shell, or fish shell configuration. If you don't want to let Home Manager manage your shell then you will have to manually source the `~/.nix-profile/etc/profile.d/hm-session-vars.sh` file in an appropriate way. In Bash and Z shell this can be done by adding
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
----
|
||||
|
||||
to your `.profile` and `.zshrc` files, respectively. The `hm-session-vars.sh` file should work in most Bourne-like shells.
|
||||
to your `.profile` and `.zshrc` files, respectively. The `hm-session-vars.sh` file should work in most Bourne-like shells. For fish shell, it is possible to source it using {foreign-env}[the foreign-env plugin]
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" > /dev/null
|
||||
----
|
||||
|
||||
=== How to set up a configuration for multiple users/machines?
|
||||
:post-your-homenix: https://www.reddit.com/r/NixOS/comments/9bb9h9/post_your_homemanager_homenix_file/
|
||||
|
|
|
@ -86,7 +86,7 @@ file in your shell configuration. Alternatively source
|
|||
+
|
||||
when managing home configuration together with system configuration.
|
||||
+
|
||||
Unfortunately, we currently only support POSIX.2-like shells such as
|
||||
This file can be sourced directly by POSIX.2-like shells such as
|
||||
https://www.gnu.org/software/bash/[Bash] or
|
||||
http://zsh.sourceforge.net/[Z shell].
|
||||
+
|
||||
|
@ -97,7 +97,9 @@ For example, if you use Bash then add
|
|||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
----
|
||||
+
|
||||
to your `~/.profile` file.
|
||||
to your `~/.profile` file. For fish shell, it is possible to use
|
||||
https://github.com/oh-my-fish/plugin-foreign-env[foreign-env] to
|
||||
source the file.
|
||||
|
||||
If instead of using channels you want to run Home Manager from a Git
|
||||
checkout of the repository then you can use the
|
||||
|
|
Loading…
Reference in a new issue