nixos-config/updateChannels.sh

24 lines
573 B
Bash

#!/usr/bin/env bash
function fetch (){
local rev=$1
local output=$2
local url=${3:-https://github.com/NixOS/nixpkgs.git}
echo
echo
echo "update $url to rev $1"
nix-prefetch-git \
--url ${url} \
--rev ${rev} \
> ${output}
}
fetch "refs/heads/nixos-21.05" .channelStable.json
fetch "refs/heads/nixos-unstable" .channelUnstable.json
fetch "refs/tags/v3.2.0" .nix-writers.json "https://cgit.krebsco.de/nix-writers/"
fetch "ef1e4480cf8af45cfdeac597b2f1b1af33923e93" .nixos-generators.json "https://github.com/nix-community/nixos-generators.git"