Created
October 17, 2017 21:41
-
-
Save dustinlacewell-wk/be4a2bebfd8a64e4ee27d4ee61fbed63 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env zsh | |
PREFIX=~/.config/nixpkgs | |
OVERLAY_SOURCE="$PREFIX/overlays/home-manager.nix" | |
OVERLAY_TARGET="../home-manager/overlay.nix" | |
REAL_LINK="$(readlink $OVERLAY_SOURCE)" | |
echo "Overlay source: $OVERLAY_SOURCE" | |
echo "Overlay target: $OVERLAY_TARGET" | |
echo "Real target: $REAL_LINK" | |
if [ -n "$REAL_LINK" = "$OVERLAY_TARGET" ]; then | |
echo "Creating link." | |
ln -s "$OVERLAY_TARGET" "$OVERLAY_SOURCE" | |
echo "Installed home-manager nixpkgs overlay symlink:" | |
echo "$OVERLAY_SOURCE -> $OVERLAY_TARGET" | |
fi | |
# source ~/.secrets | |
# home-manager -f "~/.config/nixpkgs/envs/$2.nix" "$1" |
This file contains hidden or 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
#> hm | |
Overlay source: /Users/dustinlacewell/.config/nixpkgs/overlays/home-manager.nix | |
Overlay target: ../home-manager/overlay.nix | |
Real target: ../home-manager/overlay.nix | |
/Users/dustinlacewell/bin/hm:[:13: too many arguments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment