No description
  • Nix 51.7%
  • Python 36.2%
  • Shell 12.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-06 18:03:17 +09:00
.gitignore Initial commit 2026-10-06 18:03:17 +09:00
flake.lock Initial commit 2026-10-06 18:03:17 +09:00
flake.nix Initial commit 2026-10-06 18:03:17 +09:00
package.nix Initial commit 2026-10-06 18:03:17 +09:00
patch-asar.py Initial commit 2026-10-06 18:03:17 +09:00
README.md Initial commit 2026-10-06 18:03:17 +09:00
sources.json Initial commit 2026-10-06 18:03:17 +09:00
update.sh Initial commit 2026-10-06 18:03:17 +09:00

ChatGPT desktop app (Codex) for NixOS

Nix flake packaging OpenAI's official Linux build of the ChatGPT desktop app, which contains Codex (the .deb from OpenAI's apt repository on persistent.oaistatic.com), for x86_64-linux and aarch64-linux.

Usage

Try it without installing:

nix run .

In a NixOS flake configuration:

inputs.chatgpt = {
  url = "path:/home/user/Workspace/Projects/Codex";
  inputs.nixpkgs.follows = "nixpkgs";
};

# In a module:
nixpkgs.overlays = [inputs.chatgpt.overlays.default];
environment.systemPackages = [pkgs.chatgpt];

The overlay respects the host's allowUnfree. The packages output only allows this one unfree package.

Options

pkgs.chatgpt.override { ... } accepts:

  • passwordStore (default "gnome-libsecret"): Chromium keyring backend. Use "kwallet6" on Plasma, or null to let Chromium decide.

Updating

The Debian package relies on apt for updates. Run ./update.sh to point sources.json at the newest release in OpenAI's apt repository, then rebuild.

Packaging notes

  • The app is Electron (OpenAI's "Owl" build) and ships its own static Codex CLI, ripgrep and tectonic in resources/, which are used as is.
  • There is no chrome-sandbox helper; Chromium uses the user namespace sandbox, which NixOS allows by default. The AppArmor profile from the .deb is dropped.
  • detect-libc (used by @parcel/watcher for the git repo watcher) cannot find the ELF interpreter after patchelf moves it, and NixOS has no /usr/bin/ldd. Its fallback, process.report.getReport(), crashes the app with SIGILL from a worker thread. patch-asar.py points it at the store's ldd inside app.asar, and the build fails if the string disappears.
  • Prebuilt native modules for musl and Android are removed, and the Qt shims are left without Qt since Chromium only loads them for the Qt UI toolkit.
  • On first start the app downloads a "primary runtime" bundle for Codex. Any dynamically linked binaries in it may need programs.nix-ld.enable = true.