nixos-config/updateChannels.sh
2019-10-26 11:18:26 +02:00

25 lines
667 B
Bash

#!/usr/bin/env bash
function fetch (){
local rev=$1
local output=$2
local url=${3:-https://github.com/NixOS/nixpkgs-channels.git}
echo
echo
echo "update $url to rev $1"
nix-prefetch-git \
--url ${url} \
--rev ${rev} \
> ${output}
}
fetch "refs/heads/nixos-19.09" .channelStable.json
fetch "refs/heads/nixos-unstable" .channelUnstable.json
fetch "refs/tags/v1.4.2" .krops.json "https://git.ingolf-wagner.de/krebs/krops.git"
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"