fix scripts
This commit is contained in:
parent
9c524fbf18
commit
ee34be27da
|
@ -15,8 +15,6 @@ if [ -z "${1-}" ]; then
|
|||
MODE=switch
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
if command -v nom &> /dev/null; then
|
||||
nixos-rebuild --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@" --keep-failed --log-format internal-json -v |& nom --json
|
||||
else
|
||||
|
|
|
@ -4,18 +4,10 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|||
REPO_ROOT="${SCRIPT_DIR}/.."
|
||||
cd $REPO_ROOT
|
||||
|
||||
MODE=${1-}
|
||||
if [ -z "${MODE}" ]; then
|
||||
MODE=switch
|
||||
else
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
if command -v nom &> /dev/null; then
|
||||
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
|
||||
else
|
||||
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
|
Loading…
Reference in a new issue