Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.rst: add Nix instructions #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,34 @@ Then add this line to your ``.zshrc``::

source /usr/share/zsh/plugins/zsh-you-should-use/you-should-use.plugin.zsh

`Home-Manager (Nix)`_

Install the ``zsh-you-should-use`` (Nixpkgs_) package by adding it to ``programs.zsh.plugins``::

{ pkgs, ... }:
{
programs.zsh.plugins = [
{
name = "you-should-use";
src = pkgs.zsh-you-should-use;
file = "share/zsh/plugins/you-should-use/you-should-use.plugin.zsh";
}
];
}

`NixOS`_

Install the ``zsh-you-should-use`` (Nixpkgs_) package by adding it to ``programs.zsh.interactiveShellInit`` in your NixOS configuration::

{ pkgs, ... }:
{
programs.zsh.interactiveShellInit = ''
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
'';
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont use these so I dont know how to confirm this myself 🤔 Do you have a suggestion how I can verify these instructions? maybe I can run it within a docker container?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Home-Manager, you should be able to use the Nix container and install a standalone installation of HM. From there, include the provided snippet in your configuration (.config/home-manager/home.nix), then run home-manager switch.

The NixOS instructions are less easy to verify.




Message Position
----------------

Expand Down Expand Up @@ -330,6 +358,12 @@ all you need to do is run ``mv ~/.gitconfig.bak ~/.gitconfig``

.. _AUR: https://aur.archlinux.org/packages/zsh-you-should-use/

.. _NixOS: https://nixos.org

.. _Home-Manager (Nix): https://nix-community.github.io/home-manager/

.. _Nixpkgs: https://search.nixos.org/packages?channel=unstable&query=zsh-you-should-use

.. _CHANGELOG: CHANGELOG.md

.. |GPLv3| image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg
Expand Down