HackerTrans
TopNewTrendsCommentsPastAskShowJobs

dlyons

no profile record

Submissions

Show HN: You can try my unified Nix environment for macOS/NixOS

github.com
1 points·by dlyons·vor 3 Jahren·0 comments

comments

dlyons
·letztes Jahr·discuss
Getting my hands on a 3dfx Voodoo3 felt like such a dream.
dlyons
·vor 2 Jahren·discuss
I’ve wrapped nix-darwin, home-manager etc in a Nix configuration for macOS, with a starter template and simple installer.

I’ve been running it for a couple years, you can use it to try Nix without as much up front learning.

Almost 1000 stars!

https://github.com/dustinlyons/nixos-config

Edit: Just crossed 1k! Thanks HN
dlyons
·vor 2 Jahren·discuss
I’ve been using Nix on Mac for a couple years now and haven’t seen this behavior. Just works.

Maybe mixing sudo / user permissions during initial installation broke it. Nix is pretty unforgiving with not great error messages.
dlyons
·vor 2 Jahren·discuss
Not on macOS, but if you want run NixOS in a VM or on bare metal you can use nix-impermanence. Recreates your system/state from scratch on each reboot.

https://nixos.wiki/wiki/Impermanence
dlyons
·vor 2 Jahren·discuss
I’ve beeen using Nix on macOS for years now, and I don’t imagine ever going back. Declarative software management is the future. So easy to keep my dev environment up-to-date and quickly try out new packages. Never breaks.

Also, no more docker! docker on macOS was always a pain.

I made it easy for others to try if you’re interested, almost 800 stars now:

https://github.com/dustinlyons/nixos-config
dlyons
·vor 2 Jahren·discuss
Shameless plug: I maintain a Nix for MacOS configuration starter that has a step by step guide on getting started (725+ stars).

https://github.com/dustinlyons/nixos-config
dlyons
·vor 2 Jahren·discuss
A lot of opinions on Nix here, but I manage a declarative configuration on my Mac that I now couldn’t live without. I have step by step instructions if you want to try it yourself. Many other folks have told me they find it useful too (almost 700 stars):

https://github.com/dustinlyons/nixos-config
dlyons
·vor 2 Jahren·discuss
I would argue the benefit is also it’s declarative, done forever, and your machine becomes relatively bulletproof.

Dev environment issues are a thing of the past, once you’ve defined your configuration.

If something is broken with a package, I don’t have to figure it out myself —- I just rollback, wait for someone to fix it upstream in nixpkgs and pull down the patch later.
dlyons
·vor 2 Jahren·discuss
I’ve been using Nix directly on MacOS with minimal issues for a few years now. Works great.

I hate using docker on Mac and have since replaced it with flakes and devenv.

My configuration with a step by step guide (600+ stars): https://github.com/dustinlyons/nixos-config
dlyons
·vor 2 Jahren·discuss
Here's my flake that does it: https://github.com/dustinlyons/nixos-config/blob/main/flake....
dlyons
·vor 3 Jahren·discuss
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!
dlyons
·vor 3 Jahren·discuss
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.
dlyons
·vor 3 Jahren·discuss
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.
dlyons
·vor 3 Jahren·discuss
Although Guix reads better than Nix (after all, it's Lisp), I found the support and resources available for learning severely lacking.

Plus, you have to jump through hoops to install non-free software, which goes against the ethos of Guix anyway.

IMHO, Nix is clearly "the winner" here and we'll see more and more adoption as it improves. Lots of folks are doing exciting work (see https://determinate.systems/, https://devenv.sh/, https://flakehub.com/). And the scale and organization around nixpkgs is damn impressive.
dlyons
·vor 3 Jahren·discuss
Feel free to open an issue if you have any questions! I'll be happy to help.
dlyons
·vor 3 Jahren·discuss
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?
dlyons
·vor 3 Jahren·discuss
Family. Video games. Touching grass. Running. Accepting that I only have 4-6 hours of good programming in me a day.
dlyons
·vor 3 Jahren·discuss
Hey, I have a pretty extensive Emacs configuration [1] on my Macbook using Nix, nix-darwin, and the Nix community Emacs overlay. It's been stable across multiple OS updates, and if minor stuff breaks 99% of the time an issue is already open as it's broken for everyone. Really, Nix is pretty awesome for the dev environment use case; bore yourself through the syntax and be rewarded with an easily reproducible system.

[1] https://github.com/dustinlyons/nixos-config