Hacker News new | ask | show | jobs
by dlyons 898 days ago
I tried to make Nix as easy to adopt as possible by creating Nix commands and a step by step guide (600+ stars): https://github.com/dustinlyons/nixos-config

I love Nix. I use it every day to manage multiple local dev environments. And I use devenv instead of docker for sharing project-specific environments with others.

Who wants to use docker on a Mac anyway?

4 comments

I am intrigued by this line in the description:

"Super Fast Emacs: Bleeding edge Emacs that fixes itself, thanks to a community overlay"

Could you possibly tell me (or link to the explanation) what's special about that Emacs instance?

https://github.com/dustinlyons/nixos-config/blob/main/module... -- This file appears to be part of it, but I'm not very experienced with Nix so I am unsure of how to find the file that says: "install Emacs by doing this, that, and the other".

I use this homebrew cask and have been very happy with it thus far, but I'm always up for some new exploration. https://github.com/d12frosted/homebrew-emacs-plus

EDIT2: oh lordy, this snippet:

  (setq org-todo-keyword-faces
    `(("TODO" . ,dl/green-color)
      ("STARTED" . ,dl/yellow-color)
      ("WAITING" . ,dl/light-grey-color)
      ("DELEGATED" . ,dl/teal-color)
      ("DEFERRED" . ,dl/dark-grey-color)
      ("SOMEDAY" . ,dl/purple-color)
      ("DONE" . ,dl/dark-grey-color)
      ("CANCELED" . ,dl/dark-grey-color)
      ("PROJECT" . ,dl/blue-color)
      ("APPT" . ,dl/green-color)))
Do you use all of those? Interesting that you are using the state as a kind of tagging system. Very cool! I'm also envious of your org tangle setup.

oh and the links at the top of that file are 404s.

I don't see anything about that in the .org or adjacent .el file, but it could be an outdated (or just as-yet-unseen) reference to using a community overlay of emacs-next that rolls back from breaking changes.
interesting, thank you for the info.
The project uses this overlay: https://github.com/nix-community/emacs-overlay

What that means is if something is broken in Emacs, the community will fix it, and all I need to do is run `nix flake update` to grab the latest commit and then `nix run .#build-switch` to alter my system. Easy.

Thanks for the heads-up on the 404s! I've fixed those links.

In re: to org-agenda, I don't use that as much anymore. But I heavily, heavily using org-roam w/ org-roam-dailies everyday to build my own networked graph of notes. For tasks, nowadays I just use simple docs for projects and Asana to keep a catalog of everything.

> Who wants to use docker on a Mac anyway?

For a long time, before really doubling down on Nix, Docker Desktop was my go-to for getting a Linux runtime whenever MacOS wasn’t sufficient for what I needed. It was slow, but way more portable than having a Linux VM running all the time.

Fast forward to now (since I’ve really invested in Nix) and Nix+Nix-Darwin makes my Mac feel just as configurable and extensible as NixOS/any Linux distribution.

Nix makes me an extremely content MacOS user. :)

Same. I initially started with Guix, because I'm a Lisp hacker at heart, but once I learned about nix-darwin I jumped ship and there was no going back ;)

Keeping my NixOS machine on my desk and Macbook in sync seamlessly is also super cool.

Yeah, I use a Linux machine at home, but being able to get my work-provided Macbook up and running with an identical Neovim & ZSH setup almost instantly, without having to figure out how that would all work on MacOS (in terms of package installation, changing the shell, etc) it's super awesome.
Could you tell me your secrets in achieving so many stars?

I have a similar albiet differently-structured guide at https://github.com/drakerossman/nixos-musings, but nowhere near the amount of stars you have.

1. In the beginning, it's very slow. But just iterate and make your project better and better.

2. Use your README to grab the attention of the user. I have a list of features, videos, etc. at the top.

3. I regularly post on various subreddits, Hacker News, etc. trying to support new Nix users. Sometimes I link to my project as an example of code that may help them. I've done this over a couple of years, so there's now a collection of posts people are finding and driving traffic.

4. My experience was that in the beginning, I had to grind out each star one by one. The project never went "viral". But after a certain growth point, Github will pick it up and start recommending it to others.

5. Reddit and Github are now my biggest sources of traffic.

Hope this helps!

Cool project!

Last time I tried Nix on MacOS it did not end well. Maybe I’ll try this in a VM and see how it goes…

Feel free to open an issue if you have any questions! I'll be happy to help.