it-infra/nixops/fish-nix-shell
Sebastien Bourdeauducq 5a0afc48d4 import from nix-scripts 2020-06-20 17:54:21 +08:00
..
bin import from nix-scripts 2020-06-20 17:54:21 +08:00
LICENSE import from nix-scripts 2020-06-20 17:54:21 +08:00
README.md import from nix-scripts 2020-06-20 17:54:21 +08:00
default.nix import from nix-scripts 2020-06-20 17:54:21 +08:00

README.md

fish-nix-shell

fish support for the nix-shell environment of the Nix package manager.

Installation

Installation in the user environment

Execute

nix-env -if https://github.com/haslersn/fish-nix-shell/archive/master.tar.gz

and add the following to your ~/.config/fish/config.fish. Create it if it doesn't exist.

fish-nix-shell --info-right | source

System-wide installation

Add the package to your /etc/nixos/configuration.nix:

  environment.systemPackages = with pkgs; [
    #
    # Other packages here ...
    #
    (import (fetchGit "https://github.com/haslersn/fish-nix-shell"))
  ];

and then execute: sudo nixos-rebuild switch

If you want to configure it system-wide, also add:

  programs.fish.enable = true;
  programs.fish.promptInit = ''
    fish-nix-shell --info-right | source
  '';

Flags

The fish-nix-shell command optionally takes the following flags:

Flag Meaning
--info-right While in a fish-nix-shell, display information about the loaded packages at the right.