#!/bin/bash
set -e

step() {
  if [ -t 1 ]; then
    echo -e "\033[1;32m»\033[0m $*"
  else
    echo "» $*"
  fi
}

step "Launching updater 🍵"
GNS_FROM_HOST=true /nix/var/nix/profiles/default/bin/nix develop --refresh --accept-flake-config "git+https://gitlab.com/garuda-linux/garuda-nix-subsystem.git?ref=stable#gns-update" -c "gns-update"