3 ms·
I enjoy that they supply a nix install/environment, similar to the main tailscale/tailscale repo. Is nix widespread or the standard dev environment at tailscale
by mikepurvis 2mo ago
I enjoy that they supply a nix install/environment, similar to the main tailscale/tailscale repo. Is nix widespread or the standard dev environment at tailscale, or is it like a 10% option and most people just use Docker or whatever?
- bradfitz 2mo agoIt's not our standard dev environment but some of us use Nix. We don't really use Docker much, though. Mostly just "go test" etc.
- innocent_name 2mo agoHow do you guys deal with nix & go cache? i hate when nix cold starts builds, tests without go cache.
- aerzen 2mo agoI'd guess that there is an insignificant minority of people who strongly prefer nix over anything else. And it might be because it is easy to provide and maintain compared to a .deb package.
- mikepurvis 2mo agoMaintaining and providing a deb is pretty easy too; the real killer for a nix flake I think it's how dirt simple it is to provide infinite testing builds for different branches.
- aerzen 2mo agoWell, for .deb there is the dependency problem. Even if your deb is just a release of a project, you can only use versions of dependencies that are in debian repository. Or include it all in your .deb, which becomes hard to maintain. By "infinite branches" you probably mean that a nix derivation / flake is a recipe that can build any version of the project?
- mikepurvis 2mo agoYeah, Nix flakes can be a static URL path, but they inherit your VCS refs directly, so nix run github:tailscale/tailcat Gets you the default branch. Tailcat doesn't yet have any tags, but if you want a build of the main tailscale repo at a particular tag, it's just: nix build github:tailscale/tailscale/v1.102.3 But because this can be any ref, you can specify an arbitrary branch or tag, so like if you're trying to get a colleague to check out your work it's as easy as: nix run github:tailscale/tailcat/my-fancy-branch And obviously a flake can reference other flakes with the same flexibility, so your home manager config or your company's private app flakes can transparently pull the not-yet-merged version of a change you're proposing upstream without having to make special internal "patched" releases with tortured 1.2.3~actually.1.4.6 type version numbers like in Debian. And of course that same flake reference policy applies all the way down, so you also don't need to worry about the private apt repo as a big piece of shared state that's going rev forward and break your older code branches or Dockerfiles, since each branch of your app flake has its own flake.nix and accompanying lockfile controlling which deps it is pinned to. It really is an awfully nice system, and shockingly modern in its sensibilities considering how old the Nix fundamentals are.
- swozey 2mo agoWhen I was writing rust stuff a few years ago it seemed like nix was the hip cool thing all the up and coming rustaceans (mostly unemployed students trying to land faang jobs) were using. If you're not familiar with the rust community it's very different from other programming communities I've been in (python/go/ruby/etc). Almost felt like you'd be kicked out of their lunch table if you weren't using it, but I've only see it that ubiquitous there. A lot of them, instead of learning the usual linuxii you'll be using in containers at work dive headfirst into nix.
- cure_42 2mo agoAlways makes me chuckle when there's this uncountably large group of people, and someone meets a handful of them and then decides they can make broad, sweeping statements about the entire group, despite having not met 99.99...% of them XD
- mikepurvis 2mo agoI suspect some of this goes the other way too, that the people who see the value in Nix and/or are willing to tolerate its idiosyncrasies in exchange for what is on offer there are are a lot of the same kinds of folks likely to take an interest in rust, ocaml, elixir/gleam, etc.
- ronef 2mo agoLoving this. Honestly I keep encouraging folks to just TRY native Nix for dev environments. So easy to set up and get value on day 1 that you'd be shocked. Also models/LLMs have made lightyear strides in the last few months to help with everything around it. We've been building up Nix based skill systems into our Flox skill and it's been super meaningful both on adoption and when we need to scale it up. (disclaimer I do Flox.dev which is Nix based and we do cool Nix stuff)