ci: I have forgotten what burning smells like, this is fine

This commit is contained in:
kat witch 2021-05-19 13:03:54 +01:00
parent 8fbbb6dad1
commit 1bec30d6a7
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
2 changed files with 6 additions and 6 deletions

View file

@ -28,14 +28,13 @@ with lib; {
echo "$OPENSSH_PRIVATE_KEY" > ~/.ssh/id_rsa echo "$OPENSSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa chmod 0600 ~/.ssh/id_rsa
for source in ${toString (attrNames sources)}; do for source in ${toString (attrNames sources)}; do
if nix run -f . pkgs.niv -c niv update $source; then nix run -f . pkgs.niv -c niv update $source || true
${cachix}/bin/cachix push kittywitch $(nix eval --raw "(import ./.).sources.$source.outPath")
fi
done done
nix build -f ../. sourceCache
${cachix}/bin/cachix push kittywitch $(nix eval '(toString (import ../.).sourceCache)')
if git status --porcelain | grep -qF nix/sources.json; then if git status --porcelain | grep -qF nix/sources.json; then
if nix build -Lf . hosts.{athame,yule,samhain}.config.system.build.toplevel; then if nix build -Lf . hosts.{athame,yule,samhain}.config.system.build.toplevel; then
nix build -f ../. sourceCache
${cachix}/bin/cachix push kittywitch $(nix eval '(toString (import ../.).sourceCache)')
nix-build $(echo "-A hosts."{athame,yule,samhain}.config.system.build.toplevel) | ${cachix}/bin/cachix push kittywitch
git add nix/sources.json git add nix/sources.json
export GIT_{COMMITTER,AUTHOR}_EMAIL=kat@kittywit.ch export GIT_{COMMITTER,AUTHOR}_EMAIL=kat@kittywit.ch
export GIT_{COMMITTER,AUTHOR}_NAME=kat witch export GIT_{COMMITTER,AUTHOR}_NAME=kat witch

View file

@ -19,7 +19,8 @@ rec {
runners = import ./runners.nix { inherit lib; inherit (deploy) target; }; runners = import ./runners.nix { inherit lib; inherit (deploy) target; };
sourceCache = lib.mapAttrsToList(sourceName: value: if lib.isDerivation value.outPath then value.outPath else value) (removeAttrs (import sources.nix-hexchen {}).sources [ "__functor" ]); getSources = sources: lib.attrValues (lib.removeAttrs sources [ "__functor" ]);
sourceCache = map(value: if lib.isDerivation value.outPath then value.outPath else value) (getSources sources ++ getSources (import sources.nix-hexchen {}).sources);
deploy = import ./lib/deploy.nix { deploy = import ./lib/deploy.nix {
inherit pkgs sources; inherit pkgs sources;