diff --git a/ci/niv-cron.nix b/ci/niv-cron.nix index 652d504b..c1bd3aab 100644 --- a/ci/niv-cron.nix +++ b/ci/niv-cron.nix @@ -29,10 +29,11 @@ with lib; { chmod 0600 ~/.ssh/id_rsa for source in ${toString (attrNames sources)}; do if nix run -f . pkgs.niv -c niv update $source; then - echo $(nix eval --raw "(import ./.).sources.$source.outPath") | ${cachix}/bin/cachix push kittywitch + ${cachix}/bin/cachix push kittywitch $(nix eval --raw "(import ./.).sources.$source.outPath") fi done - cachix push kittywitch $(nix eval --raw -f ../. sourceCache) + 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 nix build -Lf . hosts.{athame,yule,samhain}.config.system.build.toplevel; then git add nix/sources.json diff --git a/default.nix b/default.nix index 5678a5be..16a3efe1 100644 --- a/default.nix +++ b/default.nix @@ -19,7 +19,7 @@ rec { runners = import ./runners.nix { inherit lib; inherit (deploy) target; }; - sourceCache = toString (lib.mapAttrsToList(sourceName: value: value.outPath) (removeAttrs (import sources.nix-hexchen {}).sources [ "__functor" ])); + sourceCache = lib.mapAttrsToList(sourceName: value: if lib.isDerivation value.outPath then value.outPath else value) (removeAttrs (import sources.nix-hexchen {}).sources [ "__functor" ]); deploy = import ./lib/deploy.nix { inherit pkgs sources;