Nix flake for installing OpenCode Desktop - the AI-powered coding agent.
- Installs OpenCode Desktop from official GitHub releases
- FHS environment for proper library resolution
- Desktop integration with icons and .desktop entry
- Supports Linux (x86_64, aarch64) and macOS (x86_64, aarch64)
nix run github:anomalyco/opencode-desktop-flakenix profile install github:anomalyco/opencode-desktop-flakeAdd to your home.nix:
{inputs={nixpkgs.url="github:NixOS/nixpkgs/nixos-unstable";home-manager.url="github:nix-community/home-manager";opencode-desktop.url="github:anomalyco/opencode-desktop-flake";};outputs={self,nixpkgs,home-manager,opencode-desktop, ... }: {homeConfigurations.username=home-manager.lib.homeManagerConfiguration{pkgs=nixpkgs.legacyPackages.x86_64-linux;modules=[{home.packages=[opencode-desktop.packages.x86_64-linux.default];}];};};}{inputs.opencode-desktop.url="github:anomalyco/opencode-desktop-flake";outputs={self,nixpkgs,opencode-desktop}: {# Use opencode-desktop.packages.${system}.default};}git clone https://github.com/anomalyco/opencode-desktop-flake.git
cd opencode-desktop-flake
nix buildpackages.<system>.default- The main OpenCode Desktop package with FHS environmentpackages.<system>.unwrapped- The unwrapped binary (internal use)
x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwin
- The desktop app requires a running Wayland/X11 session
- On Wayland, the app runs via XWayland by default (set
OC_ALLOW_WAYLAND=1for native Wayland) - First launch may take a moment as the FHS environment is set up
This repository uses GitHub Actions workflows to automatically handle updates:
- Schedule - Runs daily at 6:00 AM UTC to check for new OpenCode Desktop releases
- Manual trigger - Can be triggered manually from the Actions tab
- Validation - Builds the updated x86_64 Linux package outputs before publishing changes
- Pull requests - Creates or updates a PR for review only after validation passes
- Schedule - Runs every Monday at 4:00 AM UTC
- Manual trigger - Can be triggered manually from the Actions tab
- Pull requests - Creates PRs for you to review before merging
The workflow uses update-flake-lock to check for updates to nixpkgs-unstable and other flake inputs.
MIT License - see LICENSE file