From 8cf42eae8f60bdcaa0f53301cf0b1ffb5b26d4d9 Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Mon, 6 Apr 2026 09:35:39 -0400 Subject: [PATCH] feat(systems): add work vm --- .../default.nix | 39 ++ .../prophet.txt | 19 + .../programs/terminal/claude-code/default.nix | 1 - .../graphical/wms/hyprland/default.nix | 7 +- packages/claude-code/README.md | 25 -- packages/claude-code/default.nix | 61 ---- packages/claude-code/package-lock.json | 334 ------------------ packages/claude-code/update.sh | 10 - packages/pi-coding-agent/default.nix | 6 +- .../lin-va-mbp-work-vm/default.nix | 65 ++++ 10 files changed, 132 insertions(+), 435 deletions(-) create mode 100755 homes/aarch64-linux/evanreichard@lin-va-mbp-work-vm/default.nix create mode 100644 homes/aarch64-linux/evanreichard@lin-va-mbp-work-vm/prophet.txt delete mode 100644 packages/claude-code/README.md delete mode 100644 packages/claude-code/default.nix delete mode 100644 packages/claude-code/package-lock.json delete mode 100644 packages/claude-code/update.sh create mode 100755 systems/aarch64-linux/lin-va-mbp-work-vm/default.nix diff --git a/homes/aarch64-linux/evanreichard@lin-va-mbp-work-vm/default.nix b/homes/aarch64-linux/evanreichard@lin-va-mbp-work-vm/default.nix new file mode 100755 index 0000000..e89c549 --- /dev/null +++ b/homes/aarch64-linux/evanreichard@lin-va-mbp-work-vm/default.nix @@ -0,0 +1,39 @@ +{ lib +, config +, namespace +, ... +}: +let + inherit (lib.${namespace}) enabled; +in +{ + home.stateVersion = "25.11"; + + reichard = { + user = { + enable = true; + inherit (config.snowfallorg.user) name; + }; + + services = { + ssh-agent = enabled; + }; + + programs = { + terminal = { + bash = { + enable = true; + customFastFetchLogo = ./prophet.txt; + }; + btop = enabled; + claude-code = enabled; + direnv = enabled; + git = enabled; + k9s = enabled; + nvim = enabled; + pi = enabled; + tmux = enabled; + }; + }; + }; +} diff --git a/homes/aarch64-linux/evanreichard@lin-va-mbp-work-vm/prophet.txt b/homes/aarch64-linux/evanreichard@lin-va-mbp-work-vm/prophet.txt new file mode 100644 index 0000000..7d6fa6a --- /dev/null +++ b/homes/aarch64-linux/evanreichard@lin-va-mbp-work-vm/prophet.txt @@ -0,0 +1,19 @@ +                :+++++++=.         +                 =++++++++:        +                  -++++++++:       +                   -++++++++-      +                    :++++++++-     +          .-=======. :++++++++=    +         :********+   .++++++++=   +        -********=     .=+++++++=. +       -********-        =++++++++ +      =********-          =++++++: +     =********:            -++++.  +    +********.              -+=.   +  .+*******+.                      + .+*******+. :%#%%%%%%%%%%#%-      +:********=    +%%%%%%%%%%%%*       +********=      =%%%%%%%%%%+        +.+*****-        -%%%%%%%%=         +  +***-           ......           +   =*:                             diff --git a/modules/home/programs/terminal/claude-code/default.nix b/modules/home/programs/terminal/claude-code/default.nix index 3444a2c..8fae0de 100755 --- a/modules/home/programs/terminal/claude-code/default.nix +++ b/modules/home/programs/terminal/claude-code/default.nix @@ -16,7 +16,6 @@ in config = mkIf cfg.enable { programs.claude-code = { enable = true; - package = pkgs.reichard.claude-code; mcpServers = { gopls = { type = "stdio"; diff --git a/modules/nixos/programs/graphical/wms/hyprland/default.nix b/modules/nixos/programs/graphical/wms/hyprland/default.nix index 682d0c3..a9949e1 100644 --- a/modules/nixos/programs/graphical/wms/hyprland/default.nix +++ b/modules/nixos/programs/graphical/wms/hyprland/default.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, namespace, ... }: +{ config +, pkgs +, lib +, namespace +, ... +}: let inherit (lib) mkIf; diff --git a/packages/claude-code/README.md b/packages/claude-code/README.md deleted file mode 100644 index c7d348a..0000000 --- a/packages/claude-code/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# claude-code - -Nix package for [@anthropic-ai/claude-code](https://www.npmjs.com/package/@anthropic-ai/claude-code). - -## Updating - -1. Fetch the tarball and generate a `package-lock.json`: - -```bash -mkdir /tmp/claude-update && cd /tmp/claude-update -npm pack @anthropic-ai/claude-code@ -tar -xf anthropic-ai-claude-code-.tgz -cd package -npm install --package-lock-only --ignore-scripts -``` - -2. Copy the lockfile into the package directory: - -```bash -cp package-lock.json /path/to/nixpkgs/pkgs/by-name/cl/claude-code/package-lock.json -``` - -3. Update the `version` and `hash` fields in `package.nix`. Set `hash` to `lib.fakeHash` temporarily, then build to get the correct hash: - -4. Do the same for `npmDepsHash`: diff --git a/packages/claude-code/default.nix b/packages/claude-code/default.nix deleted file mode 100644 index d248f7a..0000000 --- a/packages/claude-code/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ lib -, buildNpmPackage -, fetchzip -, writableTmpDirAsHomeHook -, versionCheckHook -, -}: -buildNpmPackage (finalAttrs: { - pname = "claude-code"; - version = "2.1.59"; - - src = fetchzip { - url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${finalAttrs.version}.tgz"; - hash = "sha256-Dam9aJ0qBdqU40ACfzGQHuytW6ur0fMLm8D5fIKd1TE="; - }; - - npmDepsHash = "sha256-K+8xoBc3apvxQ9hCpYywqgBcfLxMWSxacgJcMH8mK7E="; - - strictDeps = true; - - postPatch = '' - cp ${./package-lock.json} package-lock.json - ''; - - dontNpmBuild = true; - - env.AUTHORIZED = "1"; - - # `claude-code` tries to auto-update by default, this disables that functionality. - # https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#environment-variables - # The DEV=true env var causes claude to crash with `TypeError: window.WebSocket is not a constructor` - postInstall = '' - wrapProgram $out/bin/claude \ - --set DISABLE_AUTOUPDATER 1 \ - --unset DEV - ''; - - doInstallCheck = true; - nativeInstallCheckInputs = [ - writableTmpDirAsHomeHook - versionCheckHook - ]; - versionCheckKeepEnvironment = [ "HOME" ]; - versionCheckProgramArg = "--version"; - - passthru.updateScript = ./update.sh; - - meta = { - description = "Agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster"; - homepage = "https://github.com/anthropics/claude-code"; - downloadPage = "https://www.npmjs.com/package/@anthropic-ai/claude-code"; - license = lib.licenses.unfree; - maintainers = with lib.maintainers; [ - malo - markus1189 - omarjatoi - xiaoxiangmoe - ]; - mainProgram = "claude"; - }; -}) diff --git a/packages/claude-code/package-lock.json b/packages/claude-code/package-lock.json deleted file mode 100644 index 94b45e5..0000000 --- a/packages/claude-code/package-lock.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "name": "@anthropic-ai/claude-code", - "version": "2.1.59", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@anthropic-ai/claude-code", - "version": "2.1.59", - "license": "SEE LICENSE IN README.md", - "bin": { - "claude": "cli.js" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "@img/sharp-darwin-arm64": "^0.34.2", - "@img/sharp-darwin-x64": "^0.34.2", - "@img/sharp-linux-arm": "^0.34.2", - "@img/sharp-linux-arm64": "^0.34.2", - "@img/sharp-linux-x64": "^0.34.2", - "@img/sharp-linuxmusl-arm64": "^0.34.2", - "@img/sharp-linuxmusl-x64": "^0.34.2", - "@img/sharp-win32-arm64": "^0.34.2", - "@img/sharp-win32-x64": "^0.34.2" - } - }, - "node_modules/@img/sharp-darwin-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz", - "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.2.4" - } - }, - "node_modules/@img/sharp-darwin-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz", - "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.2.4" - } - }, - "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz", - "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz", - "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz", - "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==", - "cpu": [ - "arm" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz", - "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz", - "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz", - "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz", - "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-linux-arm": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz", - "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==", - "cpu": [ - "arm" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.2.4" - } - }, - "node_modules/@img/sharp-linux-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz", - "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.2.4" - } - }, - "node_modules/@img/sharp-linux-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz", - "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.2.4" - } - }, - "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz", - "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" - } - }, - "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz", - "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.2.4" - } - }, - "node_modules/@img/sharp-win32-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz", - "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz", - "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - } - } -} diff --git a/packages/claude-code/update.sh b/packages/claude-code/update.sh deleted file mode 100644 index a3fe5d8..0000000 --- a/packages/claude-code/update.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell --pure --keep NIX_PATH -i bash --packages nodejs nix-update git cacert - -set -euo pipefail - -version=$(npm view @anthropic-ai/claude-code version) - -# Update version and hashes -AUTHORIZED=1 NIXPKGS_ALLOW_UNFREE=1 nix-update claude-code --version="$version" --generate-lockfile -nix-update vscode-extensions.anthropic.claude-code --use-update-script --version "$version" diff --git a/packages/pi-coding-agent/default.nix b/packages/pi-coding-agent/default.nix index dc41803..dcae58b 100644 --- a/packages/pi-coding-agent/default.nix +++ b/packages/pi-coding-agent/default.nix @@ -14,16 +14,16 @@ buildNpmPackage rec { pname = "pi-coding-agent"; - version = "0.61.1"; + version = "0.65.2"; src = fetchFromGitHub { owner = "badlogic"; repo = "pi-mono"; rev = "v${version}"; - hash = "sha256-UvYd1AzwC59t+vR0wvrD4rVAcm1xoJAEWmN25NF7YcY="; + hash = "sha256-nHCQboyRT8k2t7dD0knmQSaUciQua17518CG/3jC7Rg="; }; - npmDepsHash = "sha256-nU2A+Q8PzVbjN7H+KAIFVbvETUa9BCO0czl5Yikc7gY="; + npmDepsHash = "sha256-ZFrOh2P2kkKz4kwD153ltPX852sS1JcTCvSLYwZbyoo="; nativeBuildInputs = [ pkg-config ]; diff --git a/systems/aarch64-linux/lin-va-mbp-work-vm/default.nix b/systems/aarch64-linux/lin-va-mbp-work-vm/default.nix new file mode 100755 index 0000000..17200cc --- /dev/null +++ b/systems/aarch64-linux/lin-va-mbp-work-vm/default.nix @@ -0,0 +1,65 @@ +{ namespace +, lib +, modulesPath +, ... +}: +let + inherit (lib.${namespace}) enabled; +in +{ + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + system.stateVersion = "25.11"; + time.timeZone = "America/New_York"; + + # System Config + reichard = { + nix = enabled; + + system = { + boot = { + enable = true; + silentBoot = true; + }; + + disk = { + enable = true; + diskPath = "/dev/vda"; + }; + + networking = { + enable = true; + useStatic = { + interface = "enp0s1"; + address = "192.168.64.3"; + defaultGateway = "192.168.64.1"; + nameservers = [ "192.168.64.1" ]; + }; + }; + }; + + services = { + openssh = enabled; + mosh = enabled; + }; + + virtualisation = { + podman = enabled; + }; + }; + + fileSystems."/mnt/host-share" = { + device = "share"; + fsType = "virtiofs"; + options = [ "defaults" ]; + }; + + # fileSystems."/home/evanreichard/Development" = { + # device = "/mnt/host-share/Development"; + # fsType = "none"; + # options = [ "bind" ]; + # depends = [ "/mnt/host-share" ]; + # }; +}