name: Test Virgin Nix (flake only)

on:
  workflow_call:

jobs:
  test-env-nix:
    runs-on: ubuntu-latest
    timeout-minutes: 45

    strategy:
      fail-fast: false
      matrix:
        distro: [arch, debian, ubuntu, fedora, centos]

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Show Docker version
        run: docker version

      - name: Nix flake-only test (${{ matrix.distro }})
        run: |
          set -euo pipefail
          PKGMGR_DISTRO="${{ matrix.distro }}" make test-env-nix
