Skip to content

AWS credentials are not passed to some nix commands #229

@ingun37

Description

@ingun37

I use S3 as the binary cache. I configure AWS credential using configure-aws-credentials. This action internally sets the system environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN. These env vars are used by all the AWS operations throughout the CI/CD.

Problem is that some nix commands recognizes the env vars and some don't depending on whether they are ran behalf of nix daemon or not (The inspection is detailed in NixOS/nix#5723). For example, nix path-info -r /nix/store/... --store s3://some-bucket would work while nix-build would not.

I fixed it by adding

    - uses: cachix/install-nix-action@v31
      with:
        install_options: --no-daemon

but I wish I don't have to do this.

Can it be fixed at the install-nix-action level?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions