Skip to content

Instantly share code, notes, and snippets.

@dysinger
Last active November 8, 2017 08:11
Show Gist options
  • Save dysinger/9fd3769d9e83cbf292c9 to your computer and use it in GitHub Desktop.
Save dysinger/9fd3769d9e83cbf292c9 to your computer and use it in GitHub Desktop.
Fish Nix Profile Script
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