fix scripts
This commit is contained in:
parent
9c524fbf18
commit
ee34be27da
|
@ -15,8 +15,6 @@ if [ -z "${1-}" ]; then
|
||||||
MODE=switch
|
MODE=switch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
if command -v nom &> /dev/null; then
|
if command -v nom &> /dev/null; then
|
||||||
nixos-rebuild --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@" --keep-failed --log-format internal-json -v |& nom --json
|
nixos-rebuild --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@" --keep-failed --log-format internal-json -v |& nom --json
|
||||||
else
|
else
|
||||||
|
|
|
@ -4,18 +4,10 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
REPO_ROOT="${SCRIPT_DIR}/.."
|
REPO_ROOT="${SCRIPT_DIR}/.."
|
||||||
cd $REPO_ROOT
|
cd $REPO_ROOT
|
||||||
|
|
||||||
MODE=${1-}
|
if command -v nom &> /dev/null && [ "$MODE" == "switch" ]; then
|
||||||
if [ -z "${MODE}" ]; then
|
|
||||||
MODE=switch
|
|
||||||
else
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if command -v nom &> /dev/null; then
|
|
||||||
nix build "${REPO_ROOT}#homeConfigurations.$(hostname)-$(whoami).activationPackage" "$@" --keep-failed --log-format internal-json -v |& nom --json
|
nix build "${REPO_ROOT}#homeConfigurations.$(hostname)-$(whoami).activationPackage" "$@" --keep-failed --log-format internal-json -v |& nom --json
|
||||||
./activate
|
./activate
|
||||||
else
|
else
|
||||||
echo "Install nix-output-monitor for better output"
|
echo "Install nix-output-monitor for better output"
|
||||||
nix run .#home-manager -- --flake "${REPO_ROOT}#$(hostname)-$(whoami)"
|
nix run .#home-manager -- --flake "${REPO_ROOT}#$(hostname)-$(whoami)" "$MODE" "$@"
|
||||||
fi
|
fi
|
Loading…
Reference in a new issue