From ec3efbe474a89901b735684596736306fdcba947 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Tue, 12 Nov 2024 00:05:14 +0100 Subject: [PATCH] chore: improved caching --- .forgejo/workflows/build.yml | 8 ++++++++ flake.nix | 5 +++++ justfile | 1 + 3 files changed, 14 insertions(+) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index cdd4852..370f381 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -27,6 +27,10 @@ jobs: run: | nix build '.#nixosConfigurations.tanker.pkgs.attic-client' attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$') + - name: Build deploy-rs + run: | + nix build '.#deploy-rs' + attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$') - name: Build nginx run: | nix build '.#nixosConfigurations.tanker.config.services.nginx.package' @@ -49,6 +53,10 @@ jobs: run: | nix build '.#nixosConfigurations.argon.pkgs.attic-client' attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$') + - name: Build deploy-rs + run: | + nix build '.#deploy-rs' + attic push ${{ secrets.ATTIC_CACHE }} $(nix-store -qR --include-outputs $(nix-store -qd ./result) | grep -v '\.drv$') - name: Build nginx run: | nix build '.#nixosConfigurations.argon.config.services.nginx.package' diff --git a/flake.nix b/flake.nix index 25b6c8f..7734d38 100644 --- a/flake.nix +++ b/flake.nix @@ -208,6 +208,11 @@ TREEFMT_CONFIG_FILE = config.treefmt.build.configFile; REMOTE_REPO_TYPE = "forgejo"; }; + + # Used for caching (in CI) only + packages = { + deploy-rs = inputs'.deploy-rs.packages.default; + }; }; }; } diff --git a/justfile b/justfile index 329c9a3..3abdd80 100644 --- a/justfile +++ b/justfile @@ -26,6 +26,7 @@ deploy-local-machine target type=defaultLocalType: _git-pull (build-local-machin env TERM=xterm-256color {{type}}-rebuild switch --flake ".#{{target}}" sync attic push nifoc-systems /run/current-system + find ./.direnv -maxdepth 1 -name 'flake-profile-*' -type l -exec attic push nifoc-systems {} \; # Deploy to a remote machine [group('deploy')]