dotfiles/nixos/update-nixpkgs

21 lines
444 B
Plaintext
Raw Normal View History

2020-12-29 18:20:02 +01:00
#!/usr/bin/env bash
inputs=("nixpkgs" "nixpkgs-unstable" "nixpkgs-master")
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cd "${SCRIPTPATH}"
inputs="$(for input in "${inputs[@]}"; do echo --update-input ${input} ; done)"
nix flake update ${inputs}
find . -name "flake.nix" -print0 | while IFS= read -r -d '' flake
do
(
FLAKE_DIR="$(dirname "${flake}")"
cd "${FLAKE_DIR}"
echo nix flake update ${inputs}
)
done