No description
- Nix 51.7%
- Python 36.2%
- Shell 12.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| package.nix | ||
| patch-asar.py | ||
| README.md | ||
| sources.json | ||
| update.sh | ||
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, ornullto 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-sandboxhelper; Chromium uses the user namespace sandbox, which NixOS allows by default. The AppArmor profile from the.debis dropped. detect-libc(used by@parcel/watcherfor 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.pypoints it at the store'slddinsideapp.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.