ci: Forced sources caching outside of hosts build, sources: Moved to

tarballs for all sources
This commit is contained in:
kat witch 2021-05-18 09:17:14 +01:00
parent dfc6d4f4e2
commit 0f755f045e
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
2 changed files with 26 additions and 15 deletions

View file

@ -19,14 +19,15 @@ with lib; {
ci.command {
name = "niv-update-build";
displayName = "niv update build";
nativeBuildInputs = [ nix ];
nativeBuildInputs = [ nix cachix ];
environment = [ "OPENSSH_PRIVATE_KEY" ];
command = ''
mkdir ~/.ssh
echo "$OPENSSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa
for source in $(cat nix/sources.json | jq -r 'keys[]'); do
nix run -f . pkgs.niv -c niv update $source 2>&1 >/dev/null
for source in ${toString (attrNames sources)}; do
nix run -f . pkgs.niv -c niv update $source || true
echo $(nix eval --raw '(import ./.).sources.$source') | ${cachix}/bin/cachix push kittywitch
done
if git status --porcelain | grep -qF nix/sources.json ; then
if nix build -Lf . hosts.{athame,yule,samhain}.config.system.build.toplevel; then