Skip to content

Conversation

@ss-es
Copy link
Contributor

@ss-es ss-es commented Jan 30, 2026

  • Adds docker to the packages provided by the nix-shell, and sets DOCKER_HOST in the shell so that one can run docker-rootless provided by the development shell for just demo-native.
  • Uncommits .envrc and adds the file to .gitignore. I feel like this is fundamentally a personal thing that should never have been committed e.g. I have sometimes wanted to use a different shell from the flake. The existing .envrc is renamed to .envrc.example for conveience, so that it's still available for anyone to rename .envrc.example -> .envrc

@gemini-code-assist
Copy link

Summary of Changes

Hello @ss-es, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the Nix development environment by integrating Docker support and improving .envrc management. It ensures that developers can seamlessly use docker-rootless within the Nix shell for native demos and prevents personal .envrc files from being tracked in version control, promoting a cleaner and more consistent development setup.

Highlights

  • .envrc Management: The .envrc file has been renamed to .envrc.suggested and subsequently added to .gitignore to prevent personal configurations from being committed, promoting a cleaner repository.
  • Docker Integration in Nix Shell: The docker package is now included in the Nix development shell, and the DOCKER_HOST environment variable is set to support docker-rootless for native demos, enhancing the development environment's capabilities.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves the Nix shell configuration by adding Docker support for demo-native and correctly ignoring user-specific .envrc files. The changes are logical and well-described. I have one suggestion to make the Docker configuration more robust by applying it conditionally only on Linux, which will prevent issues for developers on other operating systems like macOS.

Comment on lines +280 to +281
# Required for demo-native to run with docker-rootless
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This unconditionally sets DOCKER_HOST to the path for rootless Docker on Linux. This will likely break Docker for developers on other operating systems (like macOS) or for those on Linux who are not using a rootless setup. It's better to set this environment variable conditionally, only for Linux systems.

            # Required for demo-native to run with docker-rootless on Linux
            if [[ "$(uname -s)" == "Linux" ]]; then
              export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/docker.sock"
            fi

export CARGO_HOME=$HOME/.cargo-nix

# Required for demo-native to run with docker-rootless
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @sveitser : my understanding was that this shouldn't actually interefere with anyone's existing setup but maybe I'm wrong

Copy link
Collaborator

@sveitser sveitser Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does seem to break things for me

$ export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
$  docker ps 
failed to connect to the docker API at unix:///run/user/1000/docker.sock; check if the path is correct and if the daemon is running: dial unix /run/user/1000/docker.sock: connect: no such file or directory

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But yeah a rootless docker setup seems much preferrable so let's make it work somehow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh that's unfortunate

maybe the better thing to do then is to just add a separate shell for this? with the .envrc removal it shouldn't make a difference to have it in a non-default shell

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into it a bit more but I'll just update with that if I can't find anything

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could just check if the socket exists before setting the env var?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But yeah a rootless docker setup seems much preferrable so let's make it work somehow.

I was only a bit worried about breaking existing workflows

target/

# .envrc typically just has `use flake .`
# but this should be done by the user
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update the README section concerning the direnv setup then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants