feat(home): package Claude Desktop and T3 Code, with per-host UI scaling

Add two Electron AI desktop apps built from their official upstream
binaries and wire them into the home config (x86_64 only):

- claude-desktop: Anthropic's official Linux .deb, unpacked via dpkg +
  autoPatchelfHook. Wrapper disables the SUID sandbox (nix store can't
  set it up) and adds the NixOS GL driver path so it hardware-accelerates
  instead of falling back to software rendering.
- t3-code: pingdotgg/t3code AppImage via appimageTools.wrapType2, with
  desktop entry + hicolor icons.

Both share a new custom.aiApps.deviceScaleFactor option feeding
--force-device-scale-factor; konishi's 4K@1x monitors set it to "1.5",
arrakis stays native.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Miguel Palhas
2026-07-16 14:06:47 +01:00
parent f64cc3a803
commit 938a900fbe
6 changed files with 259 additions and 13 deletions
+37 -13
View File
@@ -1,20 +1,44 @@
{ pkgs, inputs, ... }:
{
home = {
packages = with pkgs; [
inputs.claude-code.packages.${pkgs.stdenv.hostPlatform.system}.default
config,
pkgs,
inputs,
lib,
...
}:
let
# Official Anthropic Claude desktop app (Linux build, x86_64 only).
claude-desktop = pkgs.callPackage ../../../../pkgs/claude-desktop/package.nix {
inherit (config.custom.aiApps) deviceScaleFactor;
};
in
{
# Shared UI-scale knob for the Electron AI desktop apps (Claude Desktop, T3 Code).
# Set per-host (e.g. konishi's 4K@1x monitors want ~"1.5"); null = native scale.
options.custom.aiApps.deviceScaleFactor = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "1.5";
description = "--force-device-scale-factor value for Claude Desktop and T3 Code.";
};
# sandbox
bubblewrap
socat
libseccomp
config.home = {
packages =
with pkgs;
[
inputs.claude-code.packages.${pkgs.stdenv.hostPlatform.system}.default
# voice
sox
# sandbox
bubblewrap
socat
libseccomp
# beads
dolt
];
# voice
sox
# beads
dolt
]
++ lib.optional pkgs.stdenv.hostPlatform.isx86_64 claude-desktop;
file = {
".default-npm-packages".text = ''