From 92b2bf7f3131e9c78dd39ec0de282495c7096592 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Thu, 17 Sep 2026 12:16:43 -0400 Subject: [PATCH] using official grok now --- README.md | 6 +-- flake.lock | 10 ++--- flake.nix | 1 - hosts/fwbook.nix | 8 ++-- hosts/hl-fwdesk.nix | 2 +- modules/lib.nix | 22 +++++++---- pkgs/ABOUTME.md | 13 +++---- pkgs/grok-cli/default.nix | 80 --------------------------------------- 8 files changed, 35 insertions(+), 107 deletions(-) delete mode 100644 pkgs/grok-cli/default.nix diff --git a/README.md b/README.md index add9872..6da5a5c 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ To use the custom packages in your own NixOS/Home Manager configuration: in { environment.systemPackages = with pkgs; [ niri-touchscreen-gestures - grok-cli ds4 ]; }; @@ -51,7 +50,7 @@ You can also import `nixos-setup.lib` to reuse `makeNixOs`, `makeHomeManagerUser See [`pkgs/ABOUTME.md`](pkgs/ABOUTME.md) for details on each package. -**Key packages:** `niri-touchscreen-gestures` (run `niri-touchscreen-gestures` — uses built-in defaults), `grok-cli`, and `ds4` (local LLM inference with CPU/ROCm/CUDA support). +**Key packages:** `niri-touchscreen-gestures` (run `niri-touchscreen-gestures` — uses built-in defaults), and `ds4` (local LLM inference with CPU/ROCm/CUDA support). ## Quick Start @@ -130,7 +129,7 @@ All packages from `pkgs/` are available in your configuration as `pkgs.` t Example: ```nix -environment.systemPackages = with pkgs; [ niri-touchscreen-gestures grok-cli ds4 ]; +environment.systemPackages = with pkgs; [ niri-touchscreen-gestures ds4 ]; ``` See [`pkgs/ABOUTME.md`](pkgs/ABOUTME.md) for details on each package. @@ -150,6 +149,7 @@ For more details, see `secrets/ABOUTME.md`. ## Host Profiles Available profiles include: + - **Local**: `fwbook` (Framework laptop) - **Remote**: `hl-bigbox1`, `hl-bigbox2`, `hl-fwdesk`, `hl-fws1`, `hl-minipc1`, `hl-minipc2`, `hl-minipc3`, `hl-terra1` - **ISO**: `iso` (bootable image) diff --git a/flake.lock b/flake.lock index 4c8c17c..558bf16 100644 --- a/flake.lock +++ b/flake.lock @@ -1723,12 +1723,12 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1789006805, - "narHash": "sha256-xB8mKMOx1IA9vTDNLmJZ6n4wCMq/cuWBBOzGCRnqxrU=", - "rev": "8ce4ef6cb6f871616146b9fe26d2a5ae594e94fe", - "revCount": 1070770, + "lastModified": 1789546076, + "narHash": "sha256-zVxLZiSnmaaPLwnhj7pwmqe3axBg/C6nG5JZsJMh2g4=", + "rev": "b1b875982b17dabde9b4a37f3e229e74913e6db3", + "revCount": 1074753, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.1070770%2Brev-8ce4ef6cb6f871616146b9fe26d2a5ae594e94fe/01a08a9d-0319-7011-9335-3ce05f6c241f/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.1074753%2Brev-b1b875982b17dabde9b4a37f3e229e74913e6db3/01a0abaa-ae2e-7230-bd71-cbc4ff564bff/source.tar.gz" }, "original": { "type": "tarball", diff --git a/flake.nix b/flake.nix index 412aa64..f6addcd 100644 --- a/flake.nix +++ b/flake.nix @@ -232,7 +232,6 @@ { openwrt-glmain = (openwrt (import ./openwrt-routers/glmain.nix)).deployScript; openwrt-glmain-dry-run = (openwrt (import ./openwrt-routers/glmain.nix)).dryRunScript; - grok-cli = lib.pkgs.${system}.grok-cli; ds4 = lib.pkgs.${system}.ds4; buzz-desktop = lib.pkgs.${system}.buzz-desktop; colibri = lib.pkgs.${system}.colibri; diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 088d5e8..1a4cb9a 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -233,7 +233,9 @@ in # Work gdk - slack + unstablePkgs.slack + unstablePkgs.slacky + unstablePkgs.slack-term # IPhone Tethering libimobiledevice @@ -244,8 +246,8 @@ in # coding agents claude-desktop - grok-cli - pi-coding-agent + unstablePkgs.grok-build + unstablePkgs.pi-coding-agent claude-code buzz-desktop bubblewrap diff --git a/hosts/hl-fwdesk.nix b/hosts/hl-fwdesk.nix index fe333b4..3b0fbaa 100644 --- a/hosts/hl-fwdesk.nix +++ b/hosts/hl-fwdesk.nix @@ -161,7 +161,7 @@ in # LLM Stuff unstablePkgs.ollama-rocm - grok-cli + unstablePkgs.grok-build # stable-diffusion-cpp-rocm lmstudio # DwarfStar (antirez/ds4) — ROCm build for Strix Halo (gfx1151). diff --git a/modules/lib.nix b/modules/lib.nix index 7914ea4..2d12bbc 100644 --- a/modules/lib.nix +++ b/modules/lib.nix @@ -52,9 +52,17 @@ let specialArgs.tether.nixosModules.default { programs.nix-index-database.comma.enable = true; } ]; - - # Shared function to create home-manager user configuration makeHomeConfig = {}: import ./home { }; + allUnstablePkgs = eachSystem ( + system: + import nixpkgs-unstable { + inherit system; + config = { + allowUnfree = true; + }; + } + ); + in { eachSystem = eachSystem; @@ -75,7 +83,7 @@ in extraSpecialArgs = specialArgs // { inherit system skygUtils; user = userConfig; - unstablePkgs = nixpkgs-unstable.legacyPackages.${system}; + unstablePkgs = allUnstablePkgs.${system}; }; modules = [ { @@ -96,7 +104,7 @@ in }: nixpkgs.lib.nixosSystem { specialArgs = specialArgs // { inherit system skygUtils user; - unstablePkgs = nixpkgs-unstable.legacyPackages.${system}; + unstablePkgs = allUnstablePkgs.${system}; }; inherit system; modules = osModules ++ [ @@ -119,7 +127,7 @@ in }: nixpkgs.lib.nixosSystem { specialArgs = specialArgs // { inherit system skygUtils user; - unstablePkgs = nixpkgs-unstable.legacyPackages.${system}; + unstablePkgs = allUnstablePkgs.${system}; }; inherit system; modules = osModules ++ [ @@ -145,7 +153,7 @@ in }: nixpkgs.lib.nixosSystem { specialArgs = specialArgs // { inherit system skygUtils user; - unstablePkgs = nixpkgs-unstable.legacyPackages.${system}; + unstablePkgs = allUnstablePkgs.${system}; }; inherit system; modules = osModules ++ [ @@ -174,7 +182,7 @@ in inherit system; specialArgs = specialArgs // { inherit system skygUtils user; - unstablePkgs = nixpkgs-unstable.legacyPackages.${system}; + unstablePkgs = allUnstablePkgs.${system}; }; modules = [ determinate.darwinModules.default diff --git a/pkgs/ABOUTME.md b/pkgs/ABOUTME.md index 3c5330b..d204b19 100644 --- a/pkgs/ABOUTME.md +++ b/pkgs/ABOUTME.md @@ -5,13 +5,12 @@ Packages here are exposed via an overlay defined in `modules/core/default.nix`. ## Contents -| Package | Description | -|---|---| -| `grok-cli/` | xAI Grok CLI — prebuilt static binary, fetched per-platform. Exposed as `pkgs.grok-cli`. | -| `ds4/` | DwarfStar (`antirez/ds4`) DeepSeek V4 local inference engine, built from source. Backend-parameterized (`backend = "cpu" \| "rocm" \| "cuda"`); tracks `main` and builds per-host. Exposed as `pkgs.ds4` (cpu, default), `pkgs.ds4-rocm` (Strix Halo / gfx1151), `pkgs.ds4-cuda`. Installs the `ds4`, `ds4-server`, `ds4-bench`, `ds4-eval`, `ds4-agent` binaries plus a `ds4-download-model` helper for fetching GGUF weights. Model weights are a runtime concern and not packaged. | -| `colibri/` | colibrì (`JustVugg/colibri`) — GLM-5.2/OLMoE local inference engine, built from source, pinned to a tagged release. Backend-parameterized (`backend = "cpu" \| "rocm"`). Exposed as `pkgs.colibri` (cpu, default), `pkgs.colibri-rocm` (Strix Halo / gfx1151). Installs the `coli` CLI (wrapped with the Python env its converter/bench subcommands need) plus the bundled `colibri`/`olmoe` engine binaries. Model weights are a runtime concern and not packaged. | -| `niri-touchscreen-gestures/` | Python daemon that reads multi-touch events from a touchscreen via `evdev`, detects 2/3/4-finger swipes (up/down/left/right), and dispatches configurable `niri msg action` commands. Configured via TOML; exposed as `pkgs.niri-touchscreen-gestures`. | -| `buzz-desktop/` | Block Buzz desktop (Type-2 AppImage from `block/buzz`). Wrapped with `appimageTools.wrapType2` plus extra FHS libs (`elfutils`, `zstd`, WebKit/tray, GStreamer good/bad) so it runs on NixOS. Exposed as `pkgs.buzz-desktop` (`buzz-desktop` binary + desktop entry / icons). | +| Package | Description | +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ds4/` | DwarfStar (`antirez/ds4`) DeepSeek V4 local inference engine, built from source. Backend-parameterized (`backend = "cpu" \| "rocm" \| "cuda"`); tracks `main` and builds per-host. Exposed as `pkgs.ds4` (cpu, default), `pkgs.ds4-rocm` (Strix Halo / gfx1151), `pkgs.ds4-cuda`. Installs the `ds4`, `ds4-server`, `ds4-bench`, `ds4-eval`, `ds4-agent` binaries plus a `ds4-download-model` helper for fetching GGUF weights. Model weights are a runtime concern and not packaged. | +| `colibri/` | colibrì (`JustVugg/colibri`) — GLM-5.2/OLMoE local inference engine, built from source, pinned to a tagged release. Backend-parameterized (`backend = "cpu" \| "rocm"`). Exposed as `pkgs.colibri` (cpu, default), `pkgs.colibri-rocm` (Strix Halo / gfx1151). Installs the `coli` CLI (wrapped with the Python env its converter/bench subcommands need) plus the bundled `colibri`/`olmoe` engine binaries. Model weights are a runtime concern and not packaged. | +| `niri-touchscreen-gestures/` | Python daemon that reads multi-touch events from a touchscreen via `evdev`, detects 2/3/4-finger swipes (up/down/left/right), and dispatches configurable `niri msg action` commands. Configured via TOML; exposed as `pkgs.niri-touchscreen-gestures`. | +| `buzz-desktop/` | Block Buzz desktop (Type-2 AppImage from `block/buzz`). Wrapped with `appimageTools.wrapType2` plus extra FHS libs (`elfutils`, `zstd`, WebKit/tray, GStreamer good/bad) so it runs on NixOS. Exposed as `pkgs.buzz-desktop` (`buzz-desktop` binary + desktop entry / icons). | ## Adding a New Package diff --git a/pkgs/grok-cli/default.nix b/pkgs/grok-cli/default.nix deleted file mode 100644 index da4a21a..0000000 --- a/pkgs/grok-cli/default.nix +++ /dev/null @@ -1,80 +0,0 @@ -{ lib, stdenvNoCC, fetchurl }: - -# Grok CLI — xAI's command-line coding agent. -# -# Upstream ships prebuilt, self-contained binaries (static-pie ELF on Linux, -# Mach-O on macOS) via the installer at https://x.ai/cli/install.sh. There is no -# public source build, so we just fetch the right artifact per platform and drop -# it in $out/bin. No patchelf/autoPatchelfHook is needed — the Linux binary is -# statically linked. -# -# To bump: set `version` and refresh the hashes. The latest stable version is at -# https://storage.googleapis.com/grok-build-public-artifacts/cli/stable -# and the per-platform hash is: -# nix hash file --type sha256 --sri \ -# <(curl -fsSL https://storage.googleapis.com/grok-build-public-artifacts/cli/grok--) - -let - version = "0.2.33"; - - baseUrl = "https://storage.googleapis.com/grok-build-public-artifacts/cli"; - - # nix system → { upstream platform slug, artifact hash } - sources = { - "x86_64-linux" = { - platform = "linux-x86_64"; - hash = "sha256-DAd7As5qRqZkm8G7eSva05acwbL6ZzCmTPm67opkKEM="; - }; - "aarch64-linux" = { - platform = "linux-aarch64"; - hash = "sha256-Csl/20RdR5/skH2Zdv0FeuBwU7wHdXSRZ1iCp0lB88A="; - }; - "x86_64-darwin" = { - platform = "macos-x86_64"; - hash = "sha256-UzLQHZ2UXljG2rfmGxXPA0jLkHoung/UnVBtlvV3Uxg="; - }; - "aarch64-darwin" = { - platform = "macos-aarch64"; - hash = "sha256-ifFeGIepNtlhYCJj4kmZuQD/mjZGjizzKSQSjOS1LoA="; - }; - }; - - system = stdenvNoCC.hostPlatform.system; - source = sources.${system} or (throw "grok-cli: unsupported system '${system}'"); -in -stdenvNoCC.mkDerivation { - pname = "grok-cli"; - inherit version; - - src = fetchurl { - url = "${baseUrl}/grok-${version}-${source.platform}"; - inherit (source) hash; - }; - - dontUnpack = true; - - installPhase = '' - runHook preInstall - install -Dm755 "$src" "$out/bin/grok" - # Upstream installs an `agent` alias alongside `grok` (the binary dispatches - # on argv[0]); preserve it. - ln -s grok "$out/bin/agent" - runHook postInstall - ''; - - # The Linux artifact is static-pie linked, so the only check we can run is the - # one the upstream installer does: confirm it executes. - doInstallCheck = stdenvNoCC.hostPlatform.isLinux; - installCheckPhase = '' - "$out/bin/grok" --version /dev/null - ''; - - meta = { - description = "xAI's Grok command-line coding agent"; - homepage = "https://x.ai/cli"; - license = lib.licenses.unfree; - sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; - platforms = builtins.attrNames sources; - mainProgram = "grok"; - }; -}