Show HN: NixOS-DGX-Spark – DGX Spark における Nix と NixOS

2026/08/03 2:05

Show HN: NixOS-DGX-Spark – DGX Spark における Nix と NixOS

RSS: https://news.ycombinator.com/rss

要約

本文

Try DGX Spark playbooks using Nix on DGX OS, or install NixOS on your DGX Spark for the full Nix experience. The repository provides USB images and a NixOS module with settings for DGX Spark systems. This works on the NVIDIA DGX Spark itself and also on the Asus Ascent GX10. See my 5 minute lightning talk from Planet Nix for an intro: https://youtu.be/AvK_gi_snJE?si=MPKv3iiuS9B5elIE Using Nix on DGX OS (Ubuntu) You can use the dev shells and playbooks in this repo on NVIDIA DGX OS (Ubuntu) without installing NixOS. Setup

Install Nix using the official installer: sh <(curl -L https://nixos.org/nix/install) --daemon Alternatively, you can use the Determinate Nix Installer: curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

Enable flakes and nix-command by adding to /etc/nix/nix.conf: experimental-features = nix-command flakes

Enable the graham33 Cachix cache — see Caching below.

Running on Non-NixOS (e.g. DGX OS) On non-NixOS systems, Nix-built CUDA applications need nix-gl-host to find the host GPU drivers. The playbook devshells handle this automatically — container-based playbooks don't need it, and Nix-native playbooks wrap their commands with nixglhost so no manual intervention is required. For other devshells (e.g. cuda), nixglhost is available and can be used to prefix commands manually: nix develop .#cuda nixglhost deviceQuery NixOS on the DGX Spark WarningOnly DGX OS can boot from the factory firmware. You need to update firmware before installing NixOS.

USB Boot Image Build the USB image: nix build .#usb-image sudo dd if=$(echo result/iso/*.iso) of=/dev/your_usb_disk_device bs=1M status=progress sync The image includes two kernel options, selectable from the GRUB boot menu:

NixOS (default) - NVIDIA's specialised kernel for DGX Spark with full GPU support and working Ethernet NixOS (standard-kernel) - Standard NixOS 6.17 kernel (Ethernet has problems)

Booting Disable Secure Boot in the DGX Spark BIOS and boot from the USB drive. You can then follow the installation instructions in the NixOS manual: https://nixos.org/manual/nixos/stable/#sec-installation-manual Using the DGX Spark module This module provides configurable DGX Spark hardware support with options for kernel selection. Module configuration options hardware.dgx-spark = { enable = true; # Enable DGX Spark hardware support useNvidiaKernel = true; # Use NVIDIA kernel (default: true) }; Using NVIDIA kernel hardware.dgx-spark.enable = true; # Uses NVIDIA kernel by default The NVIDIA kernel is a custom build optimised for NVIDIA DGX Spark systems. The kernel configuration is generated from NVIDIA's Debian annotations and compared with NixOS defaults to produce a minimal, maintainable configuration. The module also enables the DGX Dashboard web interface at http://localhost:11000, providing GPU telemetry and system monitoring. Using standard NixOS kernel (has some issues with networking) hardware.dgx-spark = { enable = true; useNvidiaKernel = false; # Use standard NixOS 6.17 kernel }; Kernel configuration management The kernel configuration is generated from NVIDIA's Debian annotations and stored in kernel-configs/nvidia-dgx-spark-.nix. This terse configuration only contains options that differ from NixOS defaults, reducing verbosity by ~82%. To regenerate the kernel configuration: nix run .#generate-kernel-config This:

Fetches the NVIDIA kernel source from GitHub Builds the NixOS baseline kernel config Compares NVIDIA's annotations with NixOS defaults Generates a terse config file with only the differences

Regeneration is needed when:

NVIDIA kernel version changes (update kernel-configs/nvidia-kernel-source.nix) NixOS common-config changes (nixpkgs update)

You can also use a local kernel source for development: nix run .#generate-kernel-config -- --kernel-source /path/to/NV-Kernels Importing in other projects Other projects can import this flake and use the DGX Spark module: { inputs.dgx-spark.url = "github:graham33/nixos-dgx-spark";

outputs = { nixpkgs, dgx-spark, ... }: { nixosConfigurations.mySystem = nixpkgs.lib.nixosSystem { modules = [ dgx-spark.nixosModules.dgx-spark { # Enable DGX Spark support hardware.dgx-spark.enable = true; # Optionally use standard kernel: useNvidiaKernel = false; } # your other modules ]; }; }; } Quick start NixOS template For a complete NixOS configuration template specifically designed for DGX Spark systems, you can use the template:

Create a new directory for your NixOS configuration

mkdir my-dgx-spark-config cd my-dgx-spark-config

Initialise with the DGX Spark template

nix flake init -t github:graham33/nixos-dgx-spark#dgx-spark This creates a complete NixOS configuration with:

flake.nix - Flake configuration that imports the DGX Spark module configuration.nix - Main system configuration optimised for DGX Spark hardware-configuration.nix - Hardware configuration template

Customising the template After initialising the template, you need to:

Generate hardware configuration and update template:

Generate hardware config to a temporary location to get the real UUIDs

sudo nixos-generate-config --root /mnt --dir /tmp/nixos-config

Copy the real hardware UUIDs and settings from the generated file

Replace the placeholder UUIDs in hardware-configuration.nix with actual

values from /tmp/nixos-config/hardware-configuration.nix

Edit configuration.nix to customise:

Change hostname from dgx-spark to your preferred name Update username from nixos to your preferred username Add your SSH public keys for remote access Set your timezone and locale preferences Add any additional packages you need

Deploy the configuration to /etc/nixos:

Copy your configuration to /etc/nixos

sudo cp -r . /etc/nixos/

Apply the configuration

sudo nixos-rebuild switch --flake /etc/nixos#dgx-spark

Firmware updates As noted in #32, only DGX OS can boot from the factory firmware. If NixOS can't boot from the factory firmware, you need to update firmware from DGX OS first. The module enables fwupd for firmware updates. NVIDIA publishes DGX Spark firmware to the Linux Vendor Firmware Service (LVFS). To check for available updates:

To install available updates:

Playbooks This repository includes devshells for NVIDIA DGX Spark playbooks from https://build.nvidia.com/spark:

Playbook Description Type Tested on NixOS Tested on DGX OS

ComfyUI Run ComfyUI with Stable Diffusion 1.5 for AI image generation 🟢 Full Nix² ✅ ✅

Connect Two Sparks Connect two DGX Spark systems via QSFP 🟢 Full Nix² ✅ ☑️¹

DGX Dashboard Set up DGX Dashboard for system monitoring 🟢 Full Nix² ✅ ☑️¹

FLUX.1 Dreambooth FLUX.1 Dreambooth LoRA fine-tuning 🟠 Container³ ✅ ✅

Multi-Agent Chatbot Build and deploy a multi-agent chatbot 🟠 Container³ ✅ ✅

Multi-modal Inference Run multi-modal inference with vision-language models 🟠 Container³ ✅ ✅

NCCL for Two Sparks Multi-node GPU communication with NCCL 🟢 Full Nix² ✅ ☑️¹

NVFP4 FP4 model quantisation with TensorRT Model Optimizer 🟠 Container³ ✅

OpenShell Secure long-running AI agents with OpenShell sandbox 🔵 Nix + Container⁴ ✅

PyTorch Fine-tuning Container Fine-tune models with PyTorch on DGX Spark 🟠 Container³ ✅

PyTorch Fine-tuning Nix Fine-tune models with PyTorch (Nix native, no containers) 🟢 Full Nix² ✅ ✅

Speculative Decoding Speculative decoding for faster inference 🟠 Container³ ✅

TRT-LLM TensorRT-LLM for optimised inference 🟠 Container³ ✅ ✅

vLLM Container Run vLLM inference server with Qwen2.5-Math-1.5B-Instruct model 🟠 Container³ ✅ ✅

vLLM Nix Run vLLM inference server natively (Nix native, no containers) 🟢 Full Nix² ✅ ✅

¹ Pre-installed on DGX OS ² Full Nix: Fully reproducible — all dependencies installed via Nix ³ Container: Nix provides podman, but containers are pulled/built at runtime ⁴ Nix + Container: CLI tools packaged via Nix, but containers are managed by the tool at runtime Caching Flox CUDA binary cache (recommended) Flox distributes pre-built CUDA packages for aarch64-linux with NVIDIA's permission. This includes cudatoolkit, nccl, cuDNN, PyTorch, and other CUDA dependencies — dramatically reducing build times. If you use the DGX Spark NixOS module, the Flox cache is configured automatically as a substituter. For standalone Nix (e.g. on DGX OS), add to /etc/nix/nix.conf: extra-substituters = https://cache.flox.dev extra-trusted-public-keys = flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=

graham33 Cachix cache For packages built by this repo (e.g. dgx-dashboard, openshell):

Install cachix first if needed: https://docs.cachix.org/installation See https://nixos.wiki/wiki/CUDA for general CUDA caching details. nixos-anywhere (Experimental) WarningThis has not been tested yet. Use at your own risk.

You can install NixOS on a DGX Spark remotely using nixos-anywhere. This is useful for headless setups where you have SSH access to the target machine. nix run github:nix-community/nixos-anywhere -- --flake github:graham33/nixos-dgx-spark#dgx-spark root@ This partitions the NVMe disk and installs NixOS with the DGX Spark module enabled. You may want to customise nixos-anywhere/configuration.nix (e.g. to add SSH keys or change the hostname) — clone the repo and point --flake at your local checkout instead. To test the disk configuration in a VM without installing: nix run github:nix-community/nixos-anywhere -- --flake .#dgx-spark --vm-test See the nixos-anywhere documentation for full details and requirements. License MIT License - see LICENSE for details.

同じ日のほかのニュース

一覧に戻る →

2026/08/03 1:26

Show HN: Kakehashi – Linux ARM で macOS バイナリを実行するための実験的なユーザースペース

## Japanese Translation: Kakehashi は、JIT コンパイルや Apple の専用 SDK に依存せず、Linux aarch64 上で実際の macOS ARM64 ゲストを実行するためのオープンソースで CLI ファーストのユーザースペース翻訳層です。中心となるクリート(`kh-loader`、`kh-runtime`、埋め込まれた `libSystem.B.dylib`)を中心に構成され、システムコールを翻訳するとともに、ゲストのファイルシステムをホストに `/Volumes/linux/…` を介して橋渡しします。具体的には、ゲストの `/usr/local/bin` をホストのバイナリに、`/etc/ssl/cert.pem` を CA バンドルにマッピングします。インストールは `cargo install kakehashi`(ソース:`crates/kh-cli`)で行い、事前に `kh bottle ensure` でボトルを確保します。ツールの追加は `kh install`、実行は `kh run` によって行われます(例:マルチスレッド圧縮用の `kh run 7zz -- -mmt=4` や、単に `kh run curl --` など)。Linux aarch64 ベアメタル、VM、Docker/Colima(ヘルパーがアーティファクトを `.tmp/kh-out/` に出力)上で動作し、Rust 1.88 以上(Linux aarch64)、コンテナの種類に応じて 4 KiB または 16 KiB のページサイズに対応します。ベンチマークの結果では、Linux 側のマルチファイル 7-Zip 圧縮とネイティブ実行を比較した場合の全実行数のギャップは約 5.2 倍ですが、単一ファイルまたは圧縮負荷の重いワークロードではオーバーヘッドは約 1.1〜1.2 倍に留まります。Darwin クライアントツールを高価な macOS ランナー($0.062〜$0.102/分)ではなく、低価格な Linux ARM64 ランナー($0.005/分)上で実行できるため、パフォーマンスのオーバーヘッドがあっても Kakehashi は多くの場合で費用対効果に優れています。Apache 2.0 ライセンスの下にあり、Darling から派生していない本ツールは、自動化された CLI ワークフローのためにエコシステムを橋渡しする無料の代替手段を提供します。

2026/07/28 23:21

メモTaking とパーソナルナレッジ管理

## Japanese Translation: 本稿の主要な論旨は、ブレンnan ケネス・ブラウンの記事に対し、ノートツール「Obsidian」に独自の知的価値を誤って帰属させ、不均衡な見解を示していることを批判しています。著者は、ソフトウェアが整理を助けることは事実だが、画期的なアイデアそのものの源泉ではないと主張します。証拠によると、ブラウンは Obsidian が複雑なシステムであるかのように誤って描写しており、実際には 1994 年頃の技術に準じるような個人的なウィキとして機能しています。この分析では、PARA やニコラス・ルーマンが使用した歴史的なゼッテルkasten メソッドなど、確立された枠組みを参照して議論の文脈を設定し、そのようなツールは人間の創造性を置き換えるのではなくそれを支援するに過ぎないと指摘します。さらに、Obsidian のダウンロード数が約 75 万回に達しているにもかかわらず、それは 460 億ドル規模の巨大な業界内で運営されており、その現在の影響は限定的であることを示唆しています。この批判は、世界を変えるような貢献を直接ソフトウェアに帰属させることは誤った結論と不確実な引用につながることを警告しています。結局のところ、ユーザーはこのツールを独自性の源泉ではなく、個人的な解決策のための基盤として認識するべきです。 ## Text to translate: The central argument critiques Brennan Kenneth Brown's article for presenting an unbalanced view that wrongly attributes unique intellectual value to the note-taking tool Obsidian. The author asserts that while software facilitates organization, it is not the source of groundbreaking ideas itself. Evidence shows Brown mischaracterizes Obsidian as a complex system when it functions essentially as a personal Wiki, comparable to technologies from 1994. This analysis contextualizes the debate by referencing established frameworks like PARA and the historical Zettelkasten method used by Niklas Luhmann, noting that such tools merely support human creativity rather than replacing it. Furthermore, despite Obsidian having roughly 750,000 downloads, it operates within a vast $46 billion industry, suggesting its current impact is limited. The critique warns that attributing world-changing contributions directly to the software leads to flawed conclusions and inconclusive citations. Ultimately, users should recognize these tools as foundations for personal solutions rather than engines of original thought.

2026/08/03 5:26

FamilyWild を用いたホスト間の X11 サーバー共有

## Japanese Translation: 2026 年 8 月 2 日、隔離環境(コンテナや chroots など)内または非転送された SSH 接続上でグラフィカルな X11 アプリケーションを動作させる際に生じる「Authorization required, but no authorization protocol specified」というエラーを解決するための方法が詳述されました。根本原因は、`.Xauthority` クッキーが family と hostname の双方で鍵付けされており、クライアントが自分のマシン名と一致しない hostname を持つクッキーを拒絶する点にあります。 解決策は、クッキーの family フィールドの最初の 2 バイトを `0100`(`FamilyLocal`)から `0xffff`(`FamilyWild`)に書き換えることです。これには以下のコマンドを使用します:`xauth nlist :0 | sed 's/^..../ffff/' | xauth -f /tmp/portable.Xauthority nmerge -`(`:0` を `$DISPLAY` に置き換えてください)。family を `FamilyWild` に変更することで、クッキーは任意の hostname に対して有効となり、hostname が不一致のクライアントからの接続も可能になりつつ、ホストベースのアクセス制御を完全に無効にすることなく済みます。 これを使用するには、生成された `/tmp/portable.Xauthority` ファイルを bind-mount または SCP でクライアント環境に移動し、`$XAUTHORITY` 変数を指すように設定します。ただし、厳格なセキュリティ上の注意が必要です:`FamilyWild` クッキーはローカルなものよりも特定の情報が少ないため、ソケットアクセスがありファイルを閲覧できるあらゆるユーザーが表示器に接続できるようになります。そのため、ファイルのパーミッションは必ず 0600 を維持し共有マシンにはコピーを残すべきではありません。このアプローチは、ホストベースのセキュリティを完全に無効にする `xhost +` の使用や、全クッキーをクリアしつつ無効なエントリを残そうとする危険な方法よりも優先されます。著者はこのトリックを、特別に非特権 LXC コンテナへの X11 転送のために適用しています。