Live data from Hacker News

Using Nix on macOS

checkoway.net

111–116 of 116 posts

Re: Using Nix on macOS

#111
post #110

Earlier quoted context omitted.

This doesn’t tell us how to install it, which is what we’re griping about.

https://nixos.org/manual/nix/stable/installation/installing-... This worked for me. I think MacOS installation was a bit hands on due to Mac weirdness (when I did it ~2 years ago), but I think it is better now.

Yes, this is what I tried too. What you describe as “hands on” is precisely what my original complaint is about. It was even more difficult (impossible?) for me due to the case-sensitive FS setting being enabled on my Mac.

Everything about first contact with Nix is off putting. I really wish it weren’t so :/

Re: Using Nix on macOS

#112

Earlier quoted context omitted.

It doesn’t. My hope was if Apple and Microsoft provided this feature, we could build a common foundation on top.

I'm wrong, turns out, chroot works on the Mac after all. Nice, that's a first step. I'll try to play with the idea

Thanks for double checking. I really appreciate it. :)

Re: Using Nix on macOS

#113
post #15

Earlier quoted context omitted.

> Honestly, doing that may be easier and a better option than using Nix packages in MacOS. Respectfully, I disagree. I’ve been using Nix on a couple of my Macs, including on an M1, and I’ve cutdown my dependence on homebrew almost to the point of its absence; I rely more on Nix packages, than on Homebrew packages. Having said that, I still wouldn’t recommend anyone using Nix; steep learning curve, and too many rough…

> I’ve cutdown my dependence on homebrew almost to the point of its absence What are the advantages of that?

I use Nix for the advantages it provides, and use other package managers (homebrew, etc.) for things that are not available in nixpkgs.

Re: Using Nix on macOS

#114
post #67

Earlier quoted context omitted.

> I mean.. it sounds wrong[0]. I don't think flakes are really mandatory given that the status quo is stuff like brew, but home manager actually does "the thing" that Nix people are talking about. Without something like home manager or NixOS, you really are only halfway to what the actual pitch is for nix I agree— I really like NixOS-like module systems and how they merge together different bits of config to bring th…

I really like Nix's configuration language too. It seems to hit some sweet spot where it manages to be simple, expressive, versatile, and maintainable, all at the same time. So I find it sad when I see people almost instinctively dunk on the language. I wonder if recent efforts around documentation can improve things.

I think people just (understandably) have little patience for new DSLs in general.

Another thing that I'm realizing is awesome about Nix as I'm getting my feet wet with CUE (also an interesting configuration language) is that in a way, the power of Nix makes it easier to learn than it otherwise might be.

So much of what we actually do with Nix leverages functions and libraries that are written in Nixlang, stored in the same monorepo as all of our build recipes. This means that once you get more familiar with Nix-the-language from using it in your own configs, exploring the implementations of the tools you use in building your packages and environment becomes easier and more natural. And Nixpkgs is then an awesome one-stop-shop for countless examples, and even kind of a quick reference for how a bazillion different pieces of software can be configured.

Maybe it's an acquired taste, idk. But I feel like the language is great at being simple when it can and surprisingly flexible when it needs to be. And Nixpkgs becomes a great resource for users, once they learn some of that relatively simple language.

Re: Using Nix on macOS

#115

Earlier quoted context omitted.

Thanks for pointing out mitchellh/nixos-config. Do you have a config published for nixos with UTM? I’m having a heck of a time getting the screen resolution and font sizes where I want them and I’m kind of lost.

> I’m having a heck of a time getting the screen resolution and font sizes where I want them and I’m kind of lost. services.xserver.videoDrivers = [ "qxl" ]; services.spice-vdagentd.enable = true;

I just tried that and it resulted in a black screen. I suppose there is more to using that video driver than just that line in a nix configuration?

Re: Using Nix on macOS

#116

Earlier quoted context omitted.

> I’m having a heck of a time getting the screen resolution and font sizes where I want them and I’m kind of lost. services.xserver.videoDrivers = [ "qxl" ]; services.spice-vdagentd.enable = true;

I just tried that and it resulted in a black screen. I suppose there is more to using that video driver than just that line in a nix configuration?

Hey! I was misinformed, try removing:

   services.xserver.videoDrivers = [ "qxl" ];
Then you're only left with the spice line. I think qxl requires other configuration.
Post reply on HN