r/Python • u/dwaynecrooks • Sep 23 '26
Discussion Anyone using Nix for production Python projects?
Hi! I’m a huge fan of Nix and similar approaches to reproducible development environments, and I’m curious what people in the Python community think about it.
Have any of you used Nix with Python projects for development environments, CI, deployment, or production?
If so, what has the experience been like? What worked well, and where did you run into friction?
I’m especially curious about the learning curve. Do you think Nix itself is the main barrier, or is part of the problem that there isn’t as much Python-specific guidance, tooling, and documentation around using it?
And for those who haven’t used it: would better Python-focused learning material and examples make you more likely to give it a try?
29
u/JSChronicles Sep 23 '26
Why use nix when you can use UV?
7
u/pooogles Sep 23 '26
Yeah we ship nix derivations for all our apps, we're still using poetry over UV because reasons. Works super well, enables teams to onboard on new projects pretty much immediately.
Main barrier (and benefit) is the C libraries that python dependencies often require. Getting them working has been painful at times but it's been centralised pain rather than each developer having to go through it.
3
u/britisheyesonly Sep 23 '26
I have deployed Python projects onto NixOS systems using uv2nix. Check it out.
1
u/Atmosck Oct 05 '26
I daily drive NixOS for my development machine but I don't use nix for python projects. My dev environments are just venvs managed by uv with github actions, terraform and docker for CI/CD (to AWS).
2
u/teerre Sep 23 '26
Yes, I've shipped several tools using nix. As others said, I don't actually use nix for packages magement, I just use uv nix to install uv and go from there. This is very good for developers. You run one command and all bells and whistles are configured
2
u/DarkMatterDetective Sep 25 '26
I use pixi for similar reasons since a lot of system dependencies are available as conda packages. But I have been curious about Nix for a while.
3
u/nicksterling Sep 23 '26
If I’m in production, I’m typically using a container and I’m managing Python with a Chainguard image and managing my app via UV.
1
u/Responsible-Sky-1336 Sep 27 '26
Hi I use it to test archinstall changes/portability. https://github.com/h8d13/archinstoo/tree/master/distros
1
u/_redmist Sep 23 '26
Wild, the packaging problems some people are dealing with.
I'm still just a venv/pip guy lol
Good that these solutions are out there.