using official grok now
This commit is contained in:
1 parent
f2f79d8a4d
commit
92b2bf7f31
8 files changed
+35
-107
No files matched your search
@@ -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.<name>` 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)
|
||||
|
||||
Generated
+5
-5
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
+5
-3
@@ -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
|
||||
|
||||
+1
-1
@@ -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).
|
||||
|
||||
+15
-7
@@ -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
|
||||
|
||||
+6
-7
@@ -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
|
||||
|
||||
|
||||
@@ -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-<version>-<platform>)
|
||||
|
||||
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 >/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";
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user