News for hackers. Stuff that matters.
Re:20 Years of Nix by anarchogeek on Saturday March 18, 2023 @09:44AM (#35209090)
Doe nix work at all? Or is it just not actually functional on top of MacOS? I've tried a dozen times over the years and I've never gotten it working.

Seriously, how is anything so hard to use still around after 20 years!

Re:20 Years of Nix by striking on Saturday March 18, 2023 @10:02AM (#35209197)
I ship a development environment to a fleet of ~100 engineer laptops based on Nix. If it didn't work, I'd be out of a job
Re:20 Years of Nix by thisismyswamp on Saturday March 18, 2023 @12:22PM (#35210370)
Why would engineers need their environment shipped to them by a human?
Re:20 Years of Nix by striking on Saturday March 18, 2023 @12:28PM (#35210427)
Technically they `git pull` it themselves, but the fact that it continues to work involves a human.
Re:20 Years of Nix by tmountain on Saturday March 18, 2023 @01:50PM (#35211407)
Do they run NixOS or just use the package manager? What’s the host OS?
Re:20 Years of Nix by striking on Saturday March 18, 2023 @02:08PM (#35211577)
They run macOS, pull a repo, run a setup script.

They get a multi-user Nix install with a direnv integration that boots up project-local daemons. Think Postgres, Redis, and so on; those are all available, along with the Nix packages the env needs, while their current working directory is that of a project folder.

Very few things live outside of the project, but the things that do are unfortunately stateful. We'll be solving that soon, too.

Re:20 Years of Nix by earthling8118 on Sunday March 19, 2023 @02:01PM (#35221736)
Is the direnv integration custom or do you base it off of something? I use direnv extensively but I don't have it start any project daemons currently and I've been shipping scripts via devShell for managing them. I'd be very interested in this
Re:20 Years of Nix by striking on Sunday March 19, 2023 @02:57PM (#35222245)
We use nix-direnv mostly for the caching support and we use s6 as basically an init system but per project. Besides that it's all custom. We're looking to replace s6 with our own supervisor soon.

Edited to add, direnv just gets installed via `nix-env` but I wish it were using nix-darwin.

I'll probably get to write a blog post about this in a couple months.

Re:20 Years of Nix by pxc on Friday March 24, 2023 @04:24PM (#35294930)
> We're looking to replace s6 with our own supervisor soon.

Why? Anything of interest to other Nix users here?

Re:20 Years of Nix by striking on Friday March 24, 2023 @11:23PM (#35298972)
People who are writing software in Nix-based dev envs would be interested in what we're working on, but the featureset is tightly bound to resource limitations and needs, so I can't really say any more without making promises I might not be able to keep, and I would feel bad badmouthing s6 if I couldn't do any better myself.
Re:20 Years of Nix by pxc on Saturday March 25, 2023 @12:45AM (#35299514)
Well, good luck! Maybe you can Show HN some day, and either way you'll learn something. :)
Re:20 Years of Nix by dindresto on Saturday March 18, 2023 @09:47AM (#35209099)
You might want to give the new installer by Determinate Systems a try: https://determinate.systems/posts/determinate-nix-installer
Re:20 Years of Nix by ziml77 on Saturday March 18, 2023 @10:36AM (#35209450)
I'm definitely going to give that a try. I had issues with the Bash script on macOS and was annoyed that it left me with a system that I had to manually clean up.
Re:20 Years of Nix by kaba0 on Saturday March 18, 2023 @09:51AM (#35209122)
It absolutely works and is the best thing since sliced bread within package managers — many UNIX tools are just simply broken on Mac (not always on the packaging side), and in case of more niche tools it is simply not a priority.
Re:20 Years of Nix by SkyMarshal on Saturday March 18, 2023 @09:49AM (#35209111)
Hard to answer your question without info on what the problem is, but lots of people use it on MacOS. Maybe ask about your problem on /r/nixos or https://discourse.nixos.org/.
Re:20 Years of Nix by bpye on Saturday March 18, 2023 @11:24AM (#35209815)
I’ve never had an issue with Nix itself on macOS but there are occasionally packages that are broken on macOS but work on Linux - despite upstream supporting macOS.