I’ve been configuring my Framework laptop with NixOS for a few years. The original premise of a reproducible OS was really appealing, but I’ve definitely run into drawbacks. The main one is that everything seems to take forever if you’re not using Nix every day, you lose the “muscle memory”quickly.
Also, while LLMs are great for coding, they’re still not very good at writing Nix.
About LLMs not being very good at Nix, I disagree.
I went from not having written a single line of Nix to a full fledged repo with multiple mac’s, multiple NixOS hosts with impermanence, the whole lot in a couple months with remarkable speed with claude code.
Mind you I had decades of infra and dev experience behind me as well as experience with claude code and LLMs in general.
I think that in the right experienced hands they’re a great tool for becoming up to speed and productive.
I think this may be far more personal than expected. One of the things I like about running NixOS on my workstations and servers is that it's mostly hands off and right where I left it. I commonly go weeks to months or more without touching it, and it's all right there, organized, and ready to go. It allows me to offload a lot of the context and there's not much to have to remember.
I see both of your points here. I also have lost muscle memory on nix-rebuild-shell, and it's a technical onboarding to get that back. What I'm hoping for is a graphical installer within NixOS that abstracts it away for nontechncial users
Every time I hear about Nix I get pretty excited, and then there are folks in the comments that say things along the lines of, "It's great, except when it doesn't work because of some missing package/Flake, and then it's hell and there is no 'escape hatch'". It's the lack of escape hatch that scares me. What if I want to install/configure something that hasn't been Nix-ified? Do you find yourself fighting with it to do something "simple"?
I've been "all in" on NixOS for the past couple of years on my workstations and servers and will say that sometimes you do run into this, but there is an escape hatch. If you really need something that isn't available, you can just create your own package. nixpkgs continues to grow so the number of things not covered keeps growing smaller. But when you do encounter it, you can just create your own package and pull it into your flake.
AI makes this even easier, but you can usually find a similar package on nixpkgs and just modify it to suit the needs of that particular application.
I'll say this. Recently I reinstalled arch to see if I liked the freedom of it more. Within a week I reinstalled NixOS (which thanks to version control meant I was able to reinitialize it to be back in the exact state it was in beforehand).
Yeah I have no idea what I'm doing but I tell an agent to add such and such as a package in my flake.nix and it does it. I did this for getting the font I wanted in a LaTeX project even.
As a last ditch resort, you can always use flatpaks, or failing that, use distrobox and install it in a distro that does actually package it. Yeah, it's a faff but hopefully you'll have to very rarely do this (if ever, I currently daily drive nix for web development and gaming and don't have anything that isn't nix-ified but obviously that's highly up to what you need)
More packages than any other package manager you're likely to encounter.
If something isn't packaged for nix, it's often simple to package yourself. Even when this isn't simple, it's often simple to use nix to bring the build dependencies into your environment and then follow the usual (non-nix) build instructions.
I'm a lowly self-taught hobbyist who works in an entirely unrelated industry. If I can do it, you can.
You can Nixify appimages pretty easily. Oh, and you can run flatpak with a single line of config and install things that way. Oh and you can build from source using the language's package manager (e.g. cabal install etc). I've even just run the Windows exe using Wine (super easy with Nix - it has great Wine support).
Obviously the ideal is built from source. This has a lot of benefits. It allows you to overlay the package very easily - modify its source to be a fork, change compile options, etc. It allows you to expose its dependencies. Stuff like that.
> What if I want to install/configure something that hasn't been Nix-ified?
You can setup an FHS environment, this is often the strategy used when packaging closed-source binary packages. An example in nixpkgs is steam-run [0], I also used a similar approach to package Xilinx ISE [1] in a flake.
I find this semi-often, and typically just write a fixed-output derivation to pull down the vendor- or project-offered binary. I do use `nix-homebrew` for macOS apps though.
Hey, author here, the blog post takes you through my journey with nix so far: reviving an old Pixelbook with NixOS, wrangling my MacBook with nix-darwin, and super-charging Nix with AI to solve a problem I thought was unsolvable.
Do you know about any good/current blogs on Nix and flakes and home manager that ELI5 this stuff and don't involve banging my head against the wall? Plz say yes...
I'm stuck on an nVidia Jetson system (which is Ubuntu based) and using Nix with the vendor supplied CUDA etc. is a disaster. Sadly, it is not possible to install other distributions either.
So while I'm happy for those who can run Nix, keep in mind that it is not a universally available path to nirvana (liberation from suffering).
Why do you need to stick to just the "vendor supplied CUDA"? Is CUDA for arm64 targets only distributed via Nvidia ISOs for the Jetson targets? The download site seems to offer an arm64-sbsa option.
I thought the big barrier was the custom kernel they distribute. It was a pain to use the old Jetsons before Nvidia finally enabled modern c group support for containerization with docker. Perhaps building a kennel for their ended platforms is simpler now?
This is a great note for AI developers, but my use case around NixOS is targetted to consumer users. The value is in self-hosted services (clouds, VPNs, etc.) without needing to be technical, and supporting the standard suite of stuff the average consumer needs/uses. (Word processor, email, internet, PDF, zoom)
My biggest concern here is not feature parity with the latest in AI; but in usability, or maybe irrelevance (what happened to thin clients?). My hope is that what stopped thin client adoption was just paying cloud providers forever, and that the average consumer that has a home computer can use that computer as a NAS to actually be their own iCloud / OneDrive, with the ability to deploy their 'home machine' on any laptop.
But more and more tools will use AI. What if your self-hosted e-mail server uses AI to filter spam messages, for example? Or what if the consumer wants to run a drawing program that can do diffusion-style gen-AI?
Do you think a "batteries-included" NixOS install could be developed for users like me? I feel like a NixOS with libreoffice, zoom, etc. could be a drop-in windows11 replacement for a lot of users.
Maybe the key feature would be a graphical installer; something that presents an app-store iterative-install UI and in the background handles configuration.nix, so nontechnical users don't have to use the terminal or wrap their head around declarative config / version control to get a reproducible desktop that they can simply install on new machines.
For stuff that's not in Nixpkgs like this, IMO flakes is the best option. Both of these require flakes.
On the topic of deploying flakes to consumer users. I'm currently exploring using https://github.com/nix-community/nixos-generators to create pre-made install iso's for a full "batteries included" experience. You can just "overwrite" the regular nixos image. Its Nix all the way down.
Def post the link when up; from your website what I'm getting is somehow docker images + kitchen sink, which may just be my lack of knowledge but in any case means I as a consumer / target user don't get it
I was surprised (and impressed and excited) to hear some rumblings about some of y'all thoughts "provisioning" at NixCon. I still am getting my head around clan, but I have long admired your work and wish you a lot of luck.
You're misunderstanding, and it's a great opportunity for me to clarify:
I want a graphical installer for applications within NixOS.
Currently NixOS applications are added by editing the configuration.nix, with more specific tooling avaliable via flakes and home-manager. We agree that this is cool and good.
What I want for consumer use is NixOS, with an interal graphical installer that handles updating configurations in the background; ideally forming a no-terminal-necessary UX for consumer users.
IME LLMs are only useful for very basic completion, answering careful questions about Nixpkgs idioms, and some basic packaging stuff (but it's easier to just read the manual for that), when it comes to Nix. They generate needlessly overcomplicated code, and they are worse than useless when it comes to the module system (always falling into infinite recursion problems and giving you nonsense solutions to it).
What have your successes in using LLMs to write Nix code looked like?
I’ve been configuring my Framework laptop with NixOS for a few years. The original premise of a reproducible OS was really appealing, but I’ve definitely run into drawbacks. The main one is that everything seems to take forever if you’re not using Nix every day, you lose the “muscle memory”quickly.
Also, while LLMs are great for coding, they’re still not very good at writing Nix.
About LLMs not being very good at Nix, I disagree.
I went from not having written a single line of Nix to a full fledged repo with multiple mac’s, multiple NixOS hosts with impermanence, the whole lot in a couple months with remarkable speed with claude code.
Mind you I had decades of infra and dev experience behind me as well as experience with claude code and LLMs in general.
I think that in the right experienced hands they’re a great tool for becoming up to speed and productive.
I think this may be far more personal than expected. One of the things I like about running NixOS on my workstations and servers is that it's mostly hands off and right where I left it. I commonly go weeks to months or more without touching it, and it's all right there, organized, and ready to go. It allows me to offload a lot of the context and there's not much to have to remember.
I see both of your points here. I also have lost muscle memory on nix-rebuild-shell, and it's a technical onboarding to get that back. What I'm hoping for is a graphical installer within NixOS that abstracts it away for nontechncial users
Every time I hear about Nix I get pretty excited, and then there are folks in the comments that say things along the lines of, "It's great, except when it doesn't work because of some missing package/Flake, and then it's hell and there is no 'escape hatch'". It's the lack of escape hatch that scares me. What if I want to install/configure something that hasn't been Nix-ified? Do you find yourself fighting with it to do something "simple"?
I've been "all in" on NixOS for the past couple of years on my workstations and servers and will say that sometimes you do run into this, but there is an escape hatch. If you really need something that isn't available, you can just create your own package. nixpkgs continues to grow so the number of things not covered keeps growing smaller. But when you do encounter it, you can just create your own package and pull it into your flake.
AI makes this even easier, but you can usually find a similar package on nixpkgs and just modify it to suit the needs of that particular application.
I'll say this. Recently I reinstalled arch to see if I liked the freedom of it more. Within a week I reinstalled NixOS (which thanks to version control meant I was able to reinitialize it to be back in the exact state it was in beforehand).
Yeah I have no idea what I'm doing but I tell an agent to add such and such as a package in my flake.nix and it does it. I did this for getting the font I wanted in a LaTeX project even.
As a last ditch resort, you can always use flatpaks, or failing that, use distrobox and install it in a distro that does actually package it. Yeah, it's a faff but hopefully you'll have to very rarely do this (if ever, I currently daily drive nix for web development and gaming and don't have anything that isn't nix-ified but obviously that's highly up to what you need)
Nix is the escape hatch!
More packages than any other package manager you're likely to encounter.
If something isn't packaged for nix, it's often simple to package yourself. Even when this isn't simple, it's often simple to use nix to bring the build dependencies into your environment and then follow the usual (non-nix) build instructions.
I'm a lowly self-taught hobbyist who works in an entirely unrelated industry. If I can do it, you can.
You can Nixify appimages pretty easily. Oh, and you can run flatpak with a single line of config and install things that way. Oh and you can build from source using the language's package manager (e.g. cabal install etc). I've even just run the Windows exe using Wine (super easy with Nix - it has great Wine support).
Obviously the ideal is built from source. This has a lot of benefits. It allows you to overlay the package very easily - modify its source to be a fork, change compile options, etc. It allows you to expose its dependencies. Stuff like that.
> What if I want to install/configure something that hasn't been Nix-ified?
You can setup an FHS environment, this is often the strategy used when packaging closed-source binary packages. An example in nixpkgs is steam-run [0], I also used a similar approach to package Xilinx ISE [1] in a flake.
[0] - https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by...
[1] - https://github.com/benpye/nix-fpga-tools
I find this semi-often, and typically just write a fixed-output derivation to pull down the vendor- or project-offered binary. I do use `nix-homebrew` for macOS apps though.
Hey, author here, the blog post takes you through my journey with nix so far: reviving an old Pixelbook with NixOS, wrangling my MacBook with nix-darwin, and super-charging Nix with AI to solve a problem I thought was unsolvable.
Happy to answer any questions!
Do you know about any good/current blogs on Nix and flakes and home manager that ELI5 this stuff and don't involve banging my head against the wall? Plz say yes...
This "NixOS & Flakes Book" https://nixos-and-flakes.thiscute.world was posted to HN some years ago and is still a good/relevant read.
I second this. It's what I read a few months ago when I first started using Nix and it's highly approachable for beginners.
https://github.com/nix-community/awesome-nix
Check out https://zero-to-nix.com/
I'm stuck on an nVidia Jetson system (which is Ubuntu based) and using Nix with the vendor supplied CUDA etc. is a disaster. Sadly, it is not possible to install other distributions either.
So while I'm happy for those who can run Nix, keep in mind that it is not a universally available path to nirvana (liberation from suffering).
Through a new collaboration between NVIDIA, The Nix Foundation, and Flox, Nix CUDA packages are now available.
https://flox.dev/blog/the-flox-catalog-now-contains-nvidia-c...
Why do you need to stick to just the "vendor supplied CUDA"? Is CUDA for arm64 targets only distributed via Nvidia ISOs for the Jetson targets? The download site seems to offer an arm64-sbsa option.
I thought the big barrier was the custom kernel they distribute. It was a pain to use the old Jetsons before Nvidia finally enabled modern c group support for containerization with docker. Perhaps building a kennel for their ended platforms is simpler now?
There is jetpack-nixos, if this an option, which is decently maintained and for a client of numtide we build https://github.com/numtide/nix-gl-host
So they can use the host driver in nix based services with Jetson
This is a great note for AI developers, but my use case around NixOS is targetted to consumer users. The value is in self-hosted services (clouds, VPNs, etc.) without needing to be technical, and supporting the standard suite of stuff the average consumer needs/uses. (Word processor, email, internet, PDF, zoom)
My biggest concern here is not feature parity with the latest in AI; but in usability, or maybe irrelevance (what happened to thin clients?). My hope is that what stopped thin client adoption was just paying cloud providers forever, and that the average consumer that has a home computer can use that computer as a NAS to actually be their own iCloud / OneDrive, with the ability to deploy their 'home machine' on any laptop.
But more and more tools will use AI. What if your self-hosted e-mail server uses AI to filter spam messages, for example? Or what if the consumer wants to run a drawing program that can do diffusion-style gen-AI?
You have reached goal state of what I'm getting at here:
https://news.ycombinator.com/item?id=45160603
Do you think a "batteries-included" NixOS install could be developed for users like me? I feel like a NixOS with libreoffice, zoom, etc. could be a drop-in windows11 replacement for a lot of users.
Maybe the key feature would be a graphical installer; something that presents an app-store iterative-install UI and in the background handles configuration.nix, so nontechnical users don't have to use the terminal or wrap their head around declarative config / version control to get a reproducible desktop that they can simply install on new machines.
I'm super curious about a similar goal.
https://github.com/snowfallorg/nix-software-center https://github.com/nix-gui/nix-gui
These might be interesting for you :)
Yep, this is pretty much exactly what I'm looking for, thanks!
As a though experiment, how could NixOS be packaged with this for consumer users?
For stuff that's not in Nixpkgs like this, IMO flakes is the best option. Both of these require flakes.
On the topic of deploying flakes to consumer users. I'm currently exploring using https://github.com/nix-community/nixos-generators to create pre-made install iso's for a full "batteries included" experience. You can just "overwrite" the regular nixos image. Its Nix all the way down.
We are also working on something as part of clan (https://clan.lol/). Video from our NixCon 2025 talk is hopefully soon out.
Def post the link when up; from your website what I'm getting is somehow docker images + kitchen sink, which may just be my lack of knowledge but in any case means I as a consumer / target user don't get it
I was surprised (and impressed and excited) to hear some rumblings about some of y'all thoughts "provisioning" at NixCon. I still am getting my head around clan, but I have long admired your work and wish you a lot of luck.
I believe Determinate Nix has a graphical installer but I’ve never used it. [0]
[0] https://docs.determinate.systems/determinate-nix
That's just for Nix, not a way of installing NixOS.
NixOS itself has had a graphical installer for years, though.
You're misunderstanding, and it's a great opportunity for me to clarify:
I want a graphical installer for applications within NixOS.
Currently NixOS applications are added by editing the configuration.nix, with more specific tooling avaliable via flakes and home-manager. We agree that this is cool and good.
What I want for consumer use is NixOS, with an interal graphical installer that handles updating configurations in the background; ideally forming a no-terminal-necessary UX for consumer users.
And just imagine the world where Nix has a rich powerful type system and has dedicated support global configuration flags (aka useflags, aka axes).
Isn't there an attempt to do nixos in a different/"better" language?
AI + Nix is indeed amazing!
https://github.com/utensils/mcp-nixos
Highly recommend this + nix flake check for best results.
IME LLMs are only useful for very basic completion, answering careful questions about Nixpkgs idioms, and some basic packaging stuff (but it's easier to just read the manual for that), when it comes to Nix. They generate needlessly overcomplicated code, and they are worse than useless when it comes to the module system (always falling into infinite recursion problems and giving you nonsense solutions to it).
What have your successes in using LLMs to write Nix code looked like?
For me, the success is having a simple way to prompt an Agent AI to modify my NixOS desktop and get live feedback.
It can use the above MCP to search NixOS options and packages for me and make recommendations and edit the actual files, rebuild, etc.
It can then use nix flake check and other commands to verify the work it does actually did what was expected.
Even if there is still a bad result from time to time, I find this pretty valuable!
[dead]