# Nix-enabled runner image for the Void research projects.
#
# Starts from the official NixOS Nix image and enables flakes and the
# nix-command, so a workflow can run the repository's own shell:
#
#   nix-shell shell.nix --run 'bash ci/linux.sh'
#   nix develop
#
# Nothing project-specific is baked in: each project pins its own nixpkgs
# (Void/Engine's shell.nix does), so this image stays small and current.
FROM nixos/nix:latest

LABEL org.opencontainers.image.title="Void CI Nix" \
      org.opencontainers.image.description="Nix with flakes enabled for the Void projects' nix-shell/nix develop environments" \
      org.opencontainers.image.source="https://git.faumaray.com/Void/CI-Images"

RUN printf '%s\n' \
        'experimental-features = nix-command flakes' \
        'trusted-users = root' \
        >>/etc/nix/nix.conf \
    && git config --global --add safe.directory '*'

ENV NIX_CONFIG="experimental-features = nix-command flakes"

WORKDIR /workspace

CMD ["bash"]
