From fab2bd12230b32de8dbfff435d0bfd6fa37f8bc0 Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Sun, 21 Mar 2021 13:16:03 +0100 Subject: [PATCH] enable caching --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4c060ab..2616d57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,11 @@ language: nix git: submodules: false +# Cache the nix store (See https://nixos.wiki/wiki/Nix_on_Travis) +cache: + directories: + - $HOME/nix.store + branches: only: - master @@ -12,6 +17,9 @@ notifications: slack: secure: tej68wbYns4DYg488iz+4ncU3/CHJvG/5c1qntGcEjti6vZp24atuH32BzNMY+gqa5ftZtcRfqIiJ0I0tkbiFWEDzjSk89bgjG4sgwXq1gMqi/Fj4bqEpjU5m7QLa786q4UfYyTF+srca1fHPLVS5REdGjRr2wxX+bcFnTRxreGCIrlNdWhoZPPJyS37R4RR9k+l5ZWZnqWgUN6bD448O8EzMRVRWoUSxQcJ6+u4QLpinEvem4iXe+WcHOyFfsNmavxGGMMpkOSed/tzA1l+gNpl224qOJl3yAk2qrGi4N6SOnSkeJFfUO5RzX56KDC/tcCL1oJpamhDmzDvRrbDNnCjSriv+g+PkXEjiwBF/tkZwIe7nMKyc9QF698Zvdgb6Ffbq21obsRnkkddkxijthdbUKMAIREPQuU7pXRL4ykPkBeB5GkNjPlErOooxvUHvQEVElJ8NMD4ychQqW6relaYJ0W0uy0QMvrtS+cHkpprZAOZzWLa3AdEOvD50kiS2hDhJway5JHJg/LMl3I6XVVMx6fNGdNWBcezeCqkDZM+nuMJqgAtQ+Tz8bwrHLCJgS5u0lQq/MbrDkYdpmmzvA5LXxn2SpjfOAlgiFKnSIwKSuuuwzW/zCEGdPo1pfBba2VfYAN4y1l863j5ph+eMtlHf7JG8mzIWTo3k+Jx8lQ= before_install: +- sudo mkdir -p /etc/nix +- echo "substituters = https://cache.nixos.org/ file://$HOME/nix.store" | sudo tee -a /etc/nix/nix.conf > /dev/null +- echo 'require-sigs = false' | sudo tee -a /etc/nix/nix.conf > /dev/null - openssl aes-256-cbc -K $encrypted_6059a4f451fd_key -iv $encrypted_6059a4f451fd_iv -in id_rsa.enc -out deploy_key -d - mv deploy_key ~/.ssh/id_rsa @@ -25,3 +33,6 @@ script: after_success: - chmod +x ./deploy.sh - nix-shell --run './deploy.sh' +before_cache: +- mkdir -p $HOME/nix.store +- nix copy --to file://$HOME/nix.store -f default.nix buildInputs