Last active
November 8, 2017 08:11
-
-
Save dysinger/9fd3769d9e83cbf292c9 to your computer and use it in GitHub Desktop.
Fish Nix Profile Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if status --is-login | |
if [ -n $HOME ] | |
# NIX PROFILE | |
set -l NIX_LINK $HOME/.nix-profile | |
if [ ! -l $NIX_LINK ] | |
set -l _NIX_DEF_LINK /nix/var/nix/profiles/default | |
$_NIX_DEF_LINK/bin/ln -s $_NIX_DEF_LINK $NIX_LINK | |
end | |
set PATH $NIX_LINK/bin $NIX_LINK/sbin $PATH | |
# NIX CHANNELS | |
if [ ! -e $HOME/.nix-channels ] | |
echo 'http://nixos.org/channels/nixpkgs-unstable nixpkgs' >$HOME/.nix-channels | |
end | |
# NIX PATH | |
set -x NIX_PATH $NIX_PATH nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment