# SPDX-FileCopyrightText: 2025 Nitesh Kumar Debnath # # SPDX-License-Identifier: GPL-3.0-or-later name: "Set up Nix with caches" description: "Connect to Tailscale, install Nix with the project's substituters, and enable Cachix." # Composite actions cannot read the `secrets` context, so the workflow passes them in as inputs. inputs: ts-oauth-client-id: description: "Tailscale OAuth client ID" required: true ts-audience: description: "Tailscale OIDC audience" required: true cachix-auth-token: description: "Cachix auth token" required: true runs: using: composite steps: - name: Tailscale uses: tailscale/github-action@064b10558093f38325e838ddea35486bdc6b1d5c # v4.4.0 with: oauth-client-id: ${{ inputs.ts-oauth-client-id }} audience: ${{ inputs.ts-audience }} tags: tag:ci ping: cache.curlew-rankine.ts.net - name: Install Nix uses: cachix/install-nix-action@75c75c31ebece974e48ebc36b4ad125bd97bd97b # v31.11.3 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: > keep-env-derivations = true keep-outputs = true substituters = https://nix-community.cachix.org/ https://cache.manic.systems/ https://cache.forall.systems/ https://cache.nixos.org/ https://cache.curlew-rankine.ts.net/attic-1 system-features = nixos-test benchmark big-parallel kvm trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.manic.systems-1:s6OZanN8Us8vRi0jVivP3qlMn0cYHBjBALKrNe5nH8s= cache.forall.systems:5PmD7QO4MSF8YgyRZtkSGXRDo96H3bybIf2SsQh8ScI= attic-1:x1VciK3K4xP1KWLhP6MOJKwyCHPHvLMGctZHKjaR4gQ= experimental-features = pipe-operators nix-command flakes