Nix package, NixOS module, and Home Manager module for Anthropic Claude Desktop on Linux.
{
inputs.claude2nix.url = "github:b7r6/nix-claude-desktop";
outputs = { nixpkgs, claude2nix, ... }: {
# Use the overlay to get pkgs.claude-desktop
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
modules = [
{ nixpkgs.overlays = [ claude2nix.overlays.default ]; }
];
};
};
}{
imports = [ claude2nix.nixosModules.default ];
programs.claude-desktop = {
enable = true;
cowork.enable = true; # QEMU + OVMF + virtiofsd (default)
};
}{
imports = [ claude2nix.homeManagerModules.default ];
programs.claude-desktop = {
enable = true;
cowork.enable = false; # skip VM deps (default for HM)
};
}nix build .#claude-desktop-minimal- Check the Packages index for the current version.
- Update
versioninnix/pkgs/claude-desktop.nix. - Set both hashes to
lib.fakeHash, build, and replace with the correct SRI hashes.
nix build .#checks.x86_64-linux.nixos-test -L
nix build .#checks.x86_64-linux.nixos-test-no-cowork -LMIT