Skip to content

extra_nix_config doesn't work on single-user install #97

@lovesegfault

Description

@lovesegfault

If your action uses extra_nix_config, like so:

      - uses: cachix/install-nix-action@v14
        with:
          install_url: https://nixos-nix-install-tests.cachix.org/serve/ipa0c64h689jb4ys6hxsky2r8xpld0hv/install
          install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
          extra_nix_config: experimental-features = nix-command flakes

It will only work in a daemon install. For the single-user mode, such as when using ACT, the config ends up empty.

To reproduce, create this demo.yml:

name: Demo
on: [ pull_request ]
jobs:
  demo:
    runs-on: ubuntu-latest
    steps:
      - uses: cachix/install-nix-action@v14
        with:
          install_url: https://nixos-nix-install-tests.cachix.org/serve/ipa0c64h689jb4ys6hxsky2r8xpld0hv/install
          install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
          extra_nix_config: experimental-features = nix-command flakes
      - run: cat /etc/nix/nix.conf
      - uses: cachix/cachix-action@v10
        with:
          name: nix-config
          signingKey: ${{ secrets.CACHIX_SIGNING_KEY }}
      - run: cat /etc/nix/nix.conf
      - run: nix build nixpkgs#hello

and run nix-shell -p act --run "act -W demo.yml -j demo"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions