Hacker News new | past | comments | ask | show | jobs | submit login

If this is of interest, I’ve been publicly releasing a series of educational Nix videos I originally recorded for developers at Shopify that you may also enjoy: https://www.youtube.com/playlist?list=PLRGI9KQ3_HP_OFRG6R-p4...



I had to log in just so I could upvote and thank you for doing these! My biggest issue with nix on MacOS (besides not grokking the DSL even after a couple years) is that there are a decent handful of packages that dont support Darwin. How do you handle those?


Some of them actually do support darwin and we have a function in our company overlay:

    withDarwinEnabled = drv:
    drv.overrideAttrs (oldAttrs: {
      meta = with super.stdenv.lib.platforms; {
        platforms = darwin ++ oldAttrs.meta.platforms;
      };
    });
but really, we've only run into a couple of things we've cared about that are Linux-only, and just PR'd fixes upstream and duplicated them to our overlay temporarily.


Just wanted to comment that this playlist is fantastic.

Thank you very much for contributing these tutorials!


Just got started and I'm already fascinated with generations and rolling back.

How difficult is it to use as a complete replacement for Homebrew? Am I likely to find most of the packages provided by Homebrew?


It's fairly realistic. On my Mac, I only use Homebrew for casks. I have everything else installed through Nix.

One of the nicest things is that I have nearly completely overridden macOS' outdated utilities with a GNU userland (without any annoying g- prefix).

I also define most of my user configuration with home-manager (both on Mac, NixOS, and work's Ubuntu servers). On a new machine I just run

    nix run nixpkgs.home-manager
    home-manager switch
My home-manager configuration:

https://github.com/danieldk/nix-home


That's awesome. Just finished the video on home manager which seems very useful.

Your videos being directed at co-workers actually serves to highlight the usefulness of this tool.

"Oh, you're missing dependency x, y and z? Here, just copy and paste this nix command to get my Nix environment."

Then you can immediately continue discussing more productive things.

I'm curious about generations. If you roll back to a previous generation and then continue to modify that, will the generation be overwritten? If not, is there a way to track only the history of generations that contribute a change to their current generation?

Also, I saw you run NixOS in a droplet. Do you have any experience running it locally as a desktop environment? I'm curious how mature it is as a full blown Linux Desktop.


Generations are linear, so if you are on 6, roll back to 3, and make a new change (I'm 90% sure) it will create 7.

I've used NixOS a liiiiitle bit on a laptop but not enough to really get into it. We're toying with the idea of exploring supporting NixOS as a primary local development environment (and a host for cloud-based development environments) but there's lot of work to do to make that work well.


Thanks for making those videos! These are the kinds of videos, I think, the newcomers need to see to get value out of Nix.

Can you please share what screencasting software/setup you're using? It seems pretty effortless on your part to get your picture-in-picture move around.


That’s great! Is any of that stuff Mac specific, or would all of it apply on Linux also?

PS: These are about using the Nix package manager, rather than the Nix OS, right?


It’s all about using Nix on macOS for now, but a vast majority of the topics apply on Linux as well. And yes, very very little specific coverage of NixOS.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: