fix scripts

This commit is contained in:
chaos 2024-07-24 16:21:50 +01:00
parent ee34be27da
commit a87c6f9c94
No known key found for this signature in database

View file

@ -4,6 +4,11 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
REPO_ROOT="${SCRIPT_DIR}/.."
cd $REPO_ROOT
MODE=""
if [ -z "${1-}" ]; then
MODE=switch
fi
if command -v nom &> /dev/null && [ "$MODE" == "switch" ]; then
nix build "${REPO_ROOT}#homeConfigurations.$(hostname)-$(whoami).activationPackage" "$@" --keep-failed --log-format internal-json -v |& nom --json
./activate