Remix.run Logo
gouggoug 41 minutes ago

This past month, I have spent a decent amount of hours (7+) trying to setup nix on my mac with nix-darwin, and failed.

Most tutorial out there encourage you to download someone else's configuration to get going. I don't want to do that. I want to understand at its core how this thing works.

I've read the official nix language documentation, watched YouTube tutorials, read 3rd party tutorials, and still couldn't get going with a simple configuration that would install a few packages.

The nix language is also really unpalatable to me. But I could deal with that if the examples out there showed a consistent way of doing things – that's not the case. It seems one same thing can be done many different ways – but I want to know and do it the right way. I would generally turn myself to the official best practices documentation, except nix' is very short and doesn't help much.

I really want to use nix. There's no question about its advantages. But nix just won't let me (or maybe I'm too old to learn new things).

That being said, I'll probably give it another try this month...

evil-olive 5 minutes ago | parent | next [-]

> The nix language is also really unpalatable to me.

yeah, I wish I could give you some "it gets better" good news, but...

I've used NixOS as my daily driver for ~10 years, including the laptop I'm typing this on.

I love NixOS-the-OS, I love nixpkgs-the-ecosystem. but I still hate Nix-the-language.

it's like Perl and Haskell had a drunken hookup that produced a child. and then abandoned that child in the forest where it was raised by wolves and didn't have contact with another human until it was fully grown.

(to answer the inevitable replies, yes I understand functional programming in general, and yes I am aware that Guix exists)

for simple NixOS administration, you can get pretty far with treating configuration.nix as "just" a config file, rather than a program written in a Turing-complete functional language.

writing your own modules or flakes, or re-using flakes published by other people, is strictly optional. make friends with The Big Options Page [0] - anything you find there can be dropped into your configuration.nix without really needing to understand Nix-the-language.

0: https://search.nixos.org/options?channel=25.11

xyzzy_plugh 7 minutes ago | parent | prev | next [-]

I struggled with this too and it took me a while to accept that there is no right way. There are many ways, and there is a lot of legacy style out there, but ultimately you have to do what works for your own productivity/sanity.

undeveloper 5 minutes ago | parent | prev [-]

you should look into learning how to write modules. nix-darwin at its core is a somewhat underbaked port of nixos to mac OS with the same very useful module system. otherwise look into just getting home-manager working and working your way up.