nixGL: throw if no sha-256; hm-switch: allow passthru

pull/5/head
Pegasust 2023-01-12 13:04:55 -07:00
parent aa96b9e6ab
commit 1c36b5c957
1 changed files with 4 additions and 3 deletions

View File

@ -8,16 +8,17 @@ echo "SCRIPT_DIR: ${SCRIPT_DIR}"
HOME_MANAGER_DIR="${SCRIPT_DIR}/../nix-conf/home-manager"
# Mason is bad: it puts binaries onto xdg.data
# let's make mason starts fresh, just in case we introduce RPATH hacks
# that injects binary for Mason to use.
rm -rf ~/.local/share/nvim/mason
# test if we have home-manager, if not, attempt to use nix to put home-manager to
# our environment
if [ $(home-manager >/dev/null 2>&1) ]; then
# highly likely we don't even have nix support to start with, so let's fix that
sudo mv /etc/
nix-shell -p home-manager --run "home-manager switch --flake $HOME_MANAGER_DIR"
nix-shell -p home-manager --run "home-manager switch --flake $HOME_MANAGER_DIR $@"
else
home-manager switch -b backup --flake "$HOME_MANAGER_DIR"
home-manager switch -b backup --flake "$HOME_MANAGER_DIR" $@
fi