jacopone/antigravity-nix
{ "createdAt": "2025-11-18T22:37:08Z", "defaultBranch": "master", "description": "Auto-updating Nix package for Google Antigravity agentic IDE. Updates 3x/week. FHS environment with overlay support for NixOS/Home Manager.", "fullName": "jacopone/antigravity-nix", "homepage": "https://antigravity.google", "language": "Nix", "name": "antigravity-nix", "pushedAt": "2026-06-19T08:50:32Z", "stargazersCount": 139, "topics": [ "agentic-ide", "ai-coding", "ai-ide", "ai-tools", "antigravity", "auto-update", "code-editor", "declarative", "fhs-environment", "flakes", "github-actions", "google", "google-antigravity", "home-manager", "jules", "nix", "nix-flakes", "nix-packages", "nixos", "overlay" ], "updatedAt": "2026-06-19T08:50:38Z", "url": "https://github.com/jacopone/antigravity-nix"}antigravity-nix
Section titled “antigravity-nix”Auto-updating Nix Flake for Google Antigravity — zero configuration, multi-platform, version-pinned.
What This Provides
Section titled “What This Provides”- Three Components: Packages for Antigravity 2.0 (Base App), Antigravity IDE, and Antigravity CLI (
agy). - FHS environment wrapping the upstream GUI binaries with all required libraries.
- Automated updates via GitHub Actions (daily at 0700 UTC), with hash verification and build testing.
- Multi-platform: Linux (
x86_64,aarch64) is built and verified in CI. macOS (x86_64-darwin,aarch64-darwin) packages are provided and evaluate, but are experimental and currently untested — see [macOS]!(#macos-experimental). - Version pinning through tagged releases for reproducible builds.
Migrating from Antigravity 1.x
Section titled “Migrating from Antigravity 1.x”Antigravity 2.0 (May 2026) split the product into three packages, and this flake’s defaults changed to match:
default/google-antigravityis now the standalone Antigravity 2.0 app (agent orchestration), not the IDE. In the 1.x flake this attribute was the IDE.- The IDE is now
google-antigravity-ide(antigravity-ideonPATH). It remains available, but Google is steering users toward the 2.0 app, so treat it as legacy. - The CLI (
agy) is new — it is the successor to the Gemini CLI.
If your config referenced google-antigravity / google-antigravity-no-fhs expecting the IDE, switch to google-antigravity-ide / google-antigravity-ide-no-fhs. Because this flake pins versions, you upgrade on your own schedule (nix flake update antigravity-nix) — unlike the upstream app, an update here can never silently replace your IDE.
Quick Start
Section titled “Quick Start”Run the Antigravity Base App (default):
nix run github:jacopone/antigravity-nixRun the Antigravity IDE:
nix run github:jacopone/antigravity-nix#google-antigravity-ideRun the CLI tool (agy):
nix run github:jacopone/antigravity-nix#google-antigravity-cliInstallation
Section titled “Installation”NixOS Configuration
Section titled “NixOS Configuration”Add to your flake.nix:
{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; antigravity-nix = { url = "github:jacopone/antigravity-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = { self, nixpkgs, antigravity-nix, ... }: { nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ { environment.systemPackages = [ antigravity-nix.packages.x86_64-linux.default # Base App antigravity-nix.packages.x86_64-linux.google-antigravity-ide # IDE antigravity-nix.packages.x86_64-linux.google-antigravity-cli # CLI ]; } ]; }; };}Home Manager
Section titled “Home Manager”{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager"; antigravity-nix = { url = "github:jacopone/antigravity-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = { self, nixpkgs, home-manager, antigravity-nix, ... }: { homeConfigurations.your-user = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; modules = [ { home.packages = [ antigravity-nix.packages.x86_64-linux.default antigravity-nix.packages.x86_64-linux.google-antigravity-ide antigravity-nix.packages.x86_64-linux.google-antigravity-cli ]; } ]; }; };}Overlay
Section titled “Overlay”{ nixpkgs.overlays = [ inputs.antigravity-nix.overlays.default ];
environment.systemPackages = with pkgs; [ google-antigravity google-antigravity-ide google-antigravity-cli ];}Package Variants
Section titled “Package Variants”For the GUI applications (google-antigravity and google-antigravity-ide), two packaging strategies are available:
| Variant | Strategy | Trade-off |
|---|---|---|
default / google-antigravity | buildFHSEnv + bubblewrap | Sandboxed, but inherits no_new_privileges restrictions |
google-antigravity-no-fhs | autoPatchelfHook | No sandbox, full system integration |
The default uses buildFHSEnv to create an isolated FHS environment via bubblewrap. This is the most compatible approach, but the sandbox sets the kernel’s no_new_privileges flag, which prevents privilege escalation (sudo, pkexec) and can cause issues with nested namespaces.
The no-fhs variant uses autoPatchelfHook to patch ELF binaries directly, the same approach used by VS Code in nixpkgs. It runs natively on NixOS without sandboxing.
# Use the no-fhs varianthome.packages = [ antigravity-nix.packages.${system}.google-antigravity-no-fhs];Or via override:
google-antigravity.override { useFHS = false; }Chrome Profile Isolation
Section titled “Chrome Profile Isolation”By default, Antigravity GUI apps use your system Chrome profile (~/.config/google-chrome), giving access to your installed extensions. To run with an isolated Chrome profile instead (e.g., when testing untrusted apps):
google-antigravity.override { useSystemChromeProfile = false; }This omits the --user-data-dir and --profile-directory flags, letting Chrome manage its own profile independently. Works with both FHS and non-FHS variants.
antigravity # launch Antigravity Base Appantigravity-ide # launch Antigravity IDEagy # use the Antigravity CLIVersion Pinning
Section titled “Version Pinning”# Follow latest (recommended)inputs.antigravity-nix.url = "github:jacopone/antigravity-nix";
# Pin to a specific releaseinputs.antigravity-nix.url = "github:jacopone/antigravity-nix/v2.0.3-6242596486512640";Update to the latest version:
nix flake update antigravity-nixAll releases: https://github.com/jacopone/antigravity-nix/releases
Troubleshooting
Section titled “Troubleshooting”IDE Freezes on Close (Known Upstream Issue)
Section titled “IDE Freezes on Close (Known Upstream Issue)”The Antigravity IDE currently has a known bug across all Linux distributions (not just NixOS) where it may freeze the system upon closing. As a workaround, you can force-kill the process immediately after closing the window to prevent the freeze (do not run this before closing, or your work may not be saved):
pkill -9 -f antigravity-idefetchurl fails or hash mismatches
Section titled “fetchurl fails or hash mismatches”If the default fetchurl path fails — Google CDN unreachable, regional restrictions, hash drift after an upstream republish, corporate firewall — you can supply the tarball locally via srcOverride:
- Download the respective tarball from Antigravity.
- Point the package at it:
(antigravity-nix.packages.${system}.default.override { srcOverride = /absolute/path/to/Antigravity.tar.gz;})This bypasses fetchurl while keeping the rest of the packaging (FHS wrapping, Chrome integration, desktop entry) intact. No --impure and no patching required. Works for both the default and no-fhs variants.
Requirements
Section titled “Requirements”- Nix with flakes enabled
allowUnfree = true(Antigravity is proprietary software)- On
aarch64-linux, Chromium is used automatically since Google Chrome is unavailable
macOS (experimental)
Section titled “macOS (experimental)”The darwin packages (x86_64-darwin, aarch64-darwin) evaluate and fetch the official macOS builds, but are untested — CI builds and verifies Linux only. The CLI (agy, a plain binary) is the most likely to work; the GUI apps copy the .app into $out/Applications without code-signing or quarantine handling and may not launch cleanly. Reports and fixes from macOS users are welcome.
Contributing
Section titled “Contributing”- Fork the repository
- Create a feature branch
- Test with
nix buildandnix flake check - Submit a pull request
License
Section titled “License”MIT License — see [LICENSE]!(LICENSE) for details.
Google Antigravity is proprietary software by Google LLC. This is an unofficial package, not affiliated with or endorsed by Google.