Idempotent script to build and install Google Antigravity as a Flatpak on Bazzite Linux. Created with the assistance of...Antigravity.
# Build and install
./build-antigravity-flatpak.sh
# Force rebuild even if up-to-date
./build-antigravity-flatpak.sh --force
# Uninstall and clean up
./build-antigravity-flatpak.sh --uninstallAfter installing, you need to configure Antigravity's settings for proper host integration.
Edit: ~/.var/app/com.google.Antigravity/config/Antigravity/User/settings.json
The Flatpak bundles host-spawn for proper PTY allocation. Configure your terminal to use bash (recommended for compatibility with automated tools):
{
"terminal.integrated.defaultProfile.linux": "Host Bash",
"terminal.integrated.profiles.linux": {
"Host Bash": {
"path": "/app/bin/host-spawn",
"args": ["bash", "-l"],
"icon": "terminal-bash"
}
}
}Note: Using bash ensures compatibility with tool runners and automated scripts that may not understand nushell or fish syntax.
The Flatpak includes a git shim that automatically uses the host's git:
{
"git.path": "/app/bin/git"
}The following host commands are available via host-spawn shims in /app/bin/:
| Shim | Host Command |
|---|---|
/app/bin/git |
git |
/app/bin/ssh |
ssh |
/app/bin/ssh-add |
ssh-add |
/app/bin/ssh-keygen |
ssh-keygen |
/app/bin/gpg |
gpg |
/app/bin/gpg2 |
gpg2 |
host-spawn: A PTY-aware wrapper that runs commands on the host with proper terminal support- Shims: Symlinks to
host-spawnthat auto-execute the corresponding host command - Sandbox permissions: The manifest includes
--talk-name=org.freedesktop.Flatpakand--filesystem=hostfor full IDE functionality
Ensure you're using /app/bin/host-spawn (not /usr/bin/flatpak-spawn) in your terminal profiles.
Verify git.path is set to /app/bin/git in settings.json.
The shell path (e.g., /home/linuxbrew/.linuxbrew/bin/nu) must exist on your host system, not inside the Flatpak.