Better HN
topnewbestaskshowjobs
Log inSign up

dlyons

93 karma · joined Apr 15, 2022 (4y ago) · 42 submissions

Hack the planet.
Submissions

comment 1y ago · link · parent

Getting my hands on a 3dfx Voodoo3 felt like such a dream.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

Here's my flake that does it: https://github.com/dustinlyons/nixos-config/blob/main/flake....

comment 2y ago · link · parent

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!

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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?

comment 3y ago · link · parent

Family. Video games. Touching grass. Running. Accepting that I only have 4-6 hours of good programming in me a day.

18.

Show HN: You can try my unified Nix environment for macOS/NixOS(github.com ↗)

1 points · by dlyons · 3y ago · discuss

comment 3y ago · link · parent

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

comment 3y ago · link · parent

Nix has a great community of folks passionate enough to write free books ;)

I've spent over a year making my personal Nix config work well for others: https://github.com/dustinlyons/nixos-config

comment 3y ago · link · parent

Haha wow, I played a Ferengi as well! Who knows, we may have crossed paths.

comment 3y ago · link · parent

Oh wow, this is so great. Thank you for this. I haven't read this in 25+ years.

The line editor experience of building a stack and calling a function, I have not really found again. Lisp REPLs are nice but something about using the stack abstraction as the whole language.

So many amazing memories.

It was summer, 1994. I was 12, we had to move houses and my parents let me buy a 50ft phone cord to connect a modem in my room. My mom was a teacher and found me access to our local university's Internet dialup. Dialup terminal programs to connect into their VMS server. VMS had telnet which was enough to connect to all the MUDs I read about on my local BBS. I think I had just upgraded to 14.4, 28.8 wasn't even out yet.

During the summers, I would stay up all night, lay in bed pretending asleep when my dad had to get up for work in the morning, and then get back up to keep at it.

Entire virtual worlds to explore, basically text MMOs, in 1994. I was in Kentucky, felt like the only person who knew. It changed the course of my life forever, just the magic of it all.

Lots of "anthropomorphic Furry" MUCKs and TrekMUSE.

The best of times.

comment 3y ago · link · parent

13 year old me learned to write code on FurryMUCK. No idea at the time what a Furry was, or why strangers in game were trying to "yiff" me.

It was incredible though; I was big into books like Redwall, Watership Down, etc. So a social game of animals seemed fun.

The language was MUF; Multi User Forth. Stack based, push, pop, etc.

I helped port software into other MUCKs, like FluffMUCK. The people there were so kind and taught me all sorts of things about Linux, programming, building PCs, etc. I wouldn't be who I am today without the early MUCK communities.

comment 3y ago · link · parent

Here's my MacOS Nix environment that also works on NixOS:

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

comment 3y ago · link · parent

Yeah, nix-darwin is incredible. Use cases you mentioned are great; for me, I love being able to use my NixOS machine and MacBook to seamlessly carry around the same dev environment.

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

comment 3y ago · link · parent

Not my personal notes, but how I do my writing and organize my thoughts. This is my Nix configuration that powers my Macbook, Linux PC, and home lab server. Emacs + org-roam to capture everything. https://github.com/dustinlyons/nixos-config

27.

Show HN: A simple Nix config for Mac/Linux(github.com ↗)

2 points · by dlyons · 3y ago · discuss

comment 3y ago · link · parent

I'm a consultant and jump around different stacks, or have to grok some new thing pretty quickly. Nix helps me with my personal dev environment. I also generally prefer functional style of doing things, declarative, immutable, etc.

Nix is so easy to share across machines (including Mac) that it ends up being pretty cool when you pair it with something like syncthing. I can jump around, get up to speed with something new, and have it everywhere without much setup now that my machines share some Nix code and data.

Mac support is pretty great with nix-darwin; I'm able to update my flake, run nix-build and my terminal/system level apps, Mac app store apps, homebrew apps, and dock shortcuts all get updated at once. My dock points to apps in the Nix store. Sure I could do that with some scripts, but Nix ends up being way more robust.

I also still use Emacs and the community emacs-overlay is pretty awesome.

But after you're up and running, Nix makes all this stuff generally seamless is my point. There have been times I can't update due to some upstream thing, but 80% of the time it's fixed for me in nixpkgs a few days later.

nixpkgs has like 80,000+ packages the last time I looked, and is growing.

I haven't had a use case to stray outside of Docker + terraform for my work related stuff, but it's amazing for sharing dev environments on a team. Flox is a new thing to check out

My repo if it helps anyone get started: https://github.com/dustinlyons/nixos-config

comment 3y ago · link · parent

I second the recommendation for zero-to-nix, it's a great resource. I really like what DetSys is doing for the Nix community!

In addition to that, check out this Shopify video series:

- https://www.youtube.com/playlist?list=PLRGI9KQ3_HP_OFRG6R-p4...

- https://shopify.engineering/what-is-nix

I share a bunch of configuration between my M1 Macbook and x86 desktop in my office. I use home-manager with config that is organized like nixos/*, macos/*, and common/*. The first two just import the latter. Here's a link if it's helpful:

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

12