nixos-config/updateChannels.sh
2020-11-21 18:56:11 +01:00

23 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-20.09" .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"