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:
@@ -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 = ''
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
{
|
||||
imports = [
|
||||
./ralph-claude-code.nix
|
||||
./t3-code.nix
|
||||
];
|
||||
|
||||
programs = {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# T3 Code: open-source desktop control plane for coding agents (x86_64 only).
|
||||
# Shares the custom.aiApps.deviceScaleFactor knob (defined in ../claude).
|
||||
t3-code = pkgs.callPackage ../../../pkgs/t3-code/package.nix {
|
||||
inherit (config.custom.aiApps) deviceScaleFactor;
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = lib.optional pkgs.stdenv.hostPlatform.isx86_64 t3-code;
|
||||
}
|
||||
Reference in New Issue
Block a user