From fe8d26a860d16ad80477436b42110507101caf16 Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Fri, 23 May 2025 01:31:42 +1000 Subject: [PATCH] workflows/cachix: some more advanced waiting i hope this works i have no idea why git-crypt does this it also happens on local computers sometimes jalsdfjasoigrjoi --- .github/workflows/cachix.yml | 12 +++++++++++- flake.nix | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index fb6a2ef..6e0d877 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -18,7 +18,17 @@ jobs: GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }} - name: Wait.. run: - sleep 20; + for s in {1..10}; do + nix eval .#checks.x86_64-linux.is_dirty; + if [ $? -eq 0 ]; then + break; + else + if [ $s -eq 10 ]; then + exit 1 + fi + sleep 5; + fi + done - uses: cachix/install-nix-action@v31 - uses: cachix/cachix-action@v14 with: diff --git a/flake.nix b/flake.nix index 98a4505..98ffdac 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,8 @@ nixosConfigurations."hazel" = mkSystem nixpkgs-stable "hazel" "x86_64-linux" []; nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" []; + checks."x86_64-linux".is_dirty = if !(self ? rev) then throw "Dirty git tree detected." else self.rev; + packages."x86_64-linux" = let pkgs = import nixpkgs rec {