alt.hn

8/2/2026 at 5:05:54 PM

Show HN: NixOS-DGX-Spark – Nix and NixOS on the DGX Spark

https://github.com/graham33/nixos-dgx-spark

by graham33

8/2/2026 at 7:16:49 PM

Slightly off topic, but Claude Code (and likely other models/harnesses) are incredibly effective at Nix. It can trivially self-verify, without side effects, which is a perfect match for an LLM.

If you've ever been put off by the difficulty of the language, it's worth checking it out again with AI assistance.

by hamandcheese

8/2/2026 at 8:31:32 PM

Absolutely. Running NixOS is a wonderful experience for this reason. NixOS + LLMs make it a breeze to make changes to your system, install and configure new software, and debug issues. Having every aspect of your system defined in a git repo is the perfect fit for agent harnesses.

I'll admit, even with LLMs to help, the Nix language and NixOS did have a rather steep learning curve, because it's quite different from anything I'd experienced before. But after getting the hang of it, I can't imagine going back to a "normal" OS and I'm very happy I put in the time to get over the initial friction.

by HellsMaddy

8/3/2026 at 7:48:36 AM

Seconded. I always have a workspace on my NixOs where I can query an LLM to fix anything I don't like about my OS.

9 out 10 times it gets it right on the first shot and my OS is at that point slightly better for the rest of eternity (unless I stop running NixOs, which I don't see happening any time soon). About 2 years of these incremental changes, and some investments on my own part about what tools I really like, has made my OS an absolute joy and breeze to work with.

Nothing compares. It's like having a version of Omarchy, not build by some other dude to fit their world view, but for yourself that co-evolves with your own preferences and tools.

by lobofta

8/2/2026 at 10:17:51 PM

You can also push deployments to remote systems which is great for servers and headless devices like raspberry pis. I use colmena and deploy-rs on different projects because they have some nice features but you can also do it with bare nix.

I have a repo for kiosk appliances that can build an SD card image for a specific device in a fleet (so no on device configuration is required) but it can also push out updates or changes at runtime. NixOS isn't perfect for embedded devices yet but works well for cases like this in my experience.

by dhon_

8/3/2026 at 1:01:20 AM

If you are using an Apple Silicon laptop and you want to deploy to an x86-64 Linux box, this can get a bit annoying due needing to deal with cross compilation in nix.

by bergkvist

8/3/2026 at 3:10:15 PM

The Make target I use to deploy in this manner (MacBook to x86-64, single machine) is simply:

    server:
        @echo "Deploying machine (with ssh-agent forwarding): '$(MACHINE)'"
        NIX_SSHOPTS="-A" \
        nix run nixpkgs#nixos-rebuild -- switch \
        --flake .#$(MACHINE) \
        --target-host $(MACHINE).$(DOMAIN) \
        --build-host $(MACHINE).$(DOMAIN) \
        --no-reexec \
        --verbose \
        --sudo

Which has been working well. I admit I do not understand what all of these flags do in detail.

This uses ssh agent forwarding, and then sudo via PAM. That allows for passwordless sudo. Building (well, activating) without sudo is pretty involved last I checked, I could not get it to work.

by diarrhea

8/3/2026 at 1:09:13 PM

You can easily spin up a linux builder vm or I just have a dedicated remote builder on my network which I offload to

by JamesSwift

8/3/2026 at 5:36:41 AM

You can have an x86-64 remote builder, or use a service like nixbuild.net, rather than use cross-compilation.

by graham33

8/2/2026 at 10:31:49 PM

And to add to that, LLMs start with fresh context on each conversation, so they don't have the understanding of your system that human employees do. Nix lets you naturally encode that understanding in code (and in comments), making sure it never drifts from what the state of the system really is.

I never saw much point in Nix, but if you put it like that... now I want to try.

by miki123211

8/3/2026 at 1:22:05 AM

Nix (& NixOS) are very much in the same "as code" as Terraform. -- You put in extra effort now, to save effort later.

This isn't traditionally 'practical'. It's quicker to just install the package, compared to writing a declaration that says to make the package available. (And for ops, Docker images won out in terms of practicality).

Nix also quite a steep learning curve.. I expect a beginner just wants to learn how to write a package in Nix, and not learn about 'derivations', 'instantiation', etc.

Interesting to see LLM coding agents adjust that trade-off: significantly reducing the cost to "write something in Nix", so the benefits become much cheaper.

by rgoulter

8/3/2026 at 9:21:02 AM

It's true that the Nix language is quite difficult to learn. However, part of that is the poor documentation, and the weird situation where flakes are the de facto modern way of doing things, but are still treated as an "experimental" feature (which leads to further confusion when reading documentation based on the old way of doing things).

Luckily LLMs can help with this too. I asked ChatGPT to generate a course with just enough content to help an ordinary NixOS user configure their system, work with Nix code and flakes, and create/modify simple packages (which is rarely needed anyway). Just a few hours of that gave me a much stronger understanding than all the documentation / tutorials I had read before.

by jbstack

8/2/2026 at 8:29:52 PM

I got curious one Saturday and ported our monorepo to use Nix for build and test and release. It was a very pleasant process. I had to put aside to tackle more pressing things but I'm all in on using Nix in that capacity.

by aomix

8/3/2026 at 4:52:18 PM

This. One of the surprising delights of coding models has been trivially reworking my homelab into proxmox and nixos. It's a very good testable, repeatable flow for LLMs.

by glaslong

8/2/2026 at 10:39:43 PM

I set up my homelab server running NixOS entirely using Claude and what would have likely taken me months (if not years) doing it the old fashioned way, got reduced to a few hours of back and forth iteration.

by sohrob

8/2/2026 at 9:59:57 PM

Same for Bazel. It has historically been a very difficult to understand/adopt/rollout tool for a lot of engineering orgs but is going swimmingly for the organization I currently work for.

by mbo

8/2/2026 at 7:22:46 PM

I also love how with the right system prompt they can pull in tooling for what they currently need via a nix shell

by Loeffelmann

8/2/2026 at 10:20:45 PM

Also incredibly useful with "comma" so Claude can directly use tools that are not installed yet or only one-off: https://github.com/nix-community/comma

by sunaookami

8/3/2026 at 1:46:15 AM

Likewise, I don't know where my dotfiles would be without deepseek/reasonix model configuring my entire OS for almust free with cache hits.

by arikrahman

8/2/2026 at 7:33:59 PM

Agreed, Claude has helped a lot with this project, and being able to iterate without side effects for system configuration changes is really a game changer for agents.

by graham33

8/2/2026 at 7:19:35 PM

I've one-shotted custom distributions built with Nix using AI. It's crazy how well AI and Nix fit together.

by colordrops

8/2/2026 at 6:00:48 PM

Been running this on a few Asus GX10 machines with k3s on top, it’s been great. I’m running the new deepseek.

Thank you for your work!

by redrove

8/3/2026 at 9:17:08 AM

Just curious, has suspend (to RAM) been working for you?

For me the nvidia driver just keeps waking up the system instantly - but my setup is deviating from the upstream flake in a few ways, so I'm just wondering if it's worth setting up the system from scratch if it's working for other people.

Other than that, can fully second that the flake is working great. Only gotcha is that CUDA-enabled packages (including Firefox) require using the flox binary cache unless you want to compile them from source, but then the package versions can lag behind a bit (and debugging nix cache issues is surprisingly difficult).

by neobrain

8/2/2026 at 6:28:20 PM

What quant are you using, and what tps are you getting with K3?

by pixelesque

8/2/2026 at 6:59:14 PM

The FP8 version from DeepSeek themselves [0], around 1800 tps prefill and 45 tokens per second decode.

I’ve been running a custom VLLM image with b12x as well as nvfp4_ds_mla.

I would say it’s quite fantastic in day to day, I use it mostly in Hermes and sometimes for coding.

I have qwen 3.6 27b on an rtx 6000 pro as well so I use that as a workhorse in pi with DS as a reviewer/planner.

[0] https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-0731

Edit: I think you may have misread my post. k3s is NOT kimi k3, and I did mention I was running deepseek.

by redrove

8/2/2026 at 7:47:57 PM

Thanks - yeah, sorry, I mis-read that as you using both DS and K3...

by pixelesque

8/3/2026 at 1:24:16 PM

No worries! Would love to run K3 but lack the hardware for a 2.8T model, like most people.

by redrove

8/3/2026 at 12:09:17 AM

I'm doing K3 with SoL kernels, zero hassle, myelin to sweep up the crap, on shot deploy to vast or runpods. Free to the community.

I have to do like, low paying web dev to fund it, so I can't promise timelines, but it's coming and it will be free to anyone and fast as fuck.

I estimate about 20 bucks an hour at current spot rates in the hundreds if not thousands of tokens per second.

by reinitctxoffset

8/3/2026 at 3:23:37 AM

@pg @dang

you're asking me how a watch works. let's just try to keep an eye on the time.

federal felony prosecution.

by reinitctxoffset

8/2/2026 at 10:58:49 PM

i also used nixos as the base, but i went a little overboard with it, this is 7.1.2 supporting all devices and a custom driver that fixes the UMA page leak issues, and the wallpapers are all kernels at or above parity with what you can get out of the box.

i'm not quite ready to OSS the whole thing, it's got a few rough edges, but if anyone wants to alpha test, caveat emptor and it's yours.

https://www.youtube.com/shorts/mCUZ9XHIogw

by reinitctxoffset

8/3/2026 at 10:12:10 AM

I’d be happy to test this out if you want to publish an alpha branch or something.

by redrove

8/2/2026 at 5:23:26 PM

This has been amazingly helpful for managing my DGX Spark! Thank you for all your time and effort into this project!

by nixie-tubes

8/2/2026 at 5:24:40 PM

Good to hear, thanks!

by graham33

8/2/2026 at 8:39:25 PM

There is also a microvm.nix project which helped us support sandboxes with firecracker. So, whole ai workflow pipeline can now be nixos.

by mkagenius

8/2/2026 at 6:56:53 PM

This is incredible. I have a Jetson lying around and will try to it out on this. I use it to play with vision models, not LLMs, and have been wanting a better way to manage the machine.

by thenobsta

8/2/2026 at 6:58:55 PM

Thanks for sharing, saving this for when I get a DGX Spark

by haunter

8/2/2026 at 7:00:32 PM

[dead]

by hamza7159

8/2/2026 at 8:48:13 PM

[dead]

by legastenigga