nixos-config/update.sh
Charlotte Van Petegem 7e23a48ed1
Split build and switch
2020-10-05 20:27:55 +02:00

16 lines
352 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
set -x
if [ -d "../nixpkgs" -a -z "${NO_LOCAL:-}" ]
then
pushd ../nixpkgs
git fetch --all --prune
git rebase upstream/nixos-unstable || exit 1
git push || exit 1
popd
fi
nix flake update --update-input nixpkgs --update-input home-manager --update-input flake-utils
./build.sh && ./switch.sh