FYI: You can also set up Nix on an existing macOS install with homebrew already! Just set the autoMigrate = true; which I cover in the video, and leave out the line with "zap" when I set up homebrew packages, this will prevent your existing installs from being... "zapped". Additionally, I've added in a README which contains any amendments or faqs from the video. If you have an issue, feel free to raise an issue on the repo! github.com/dreamsofautonomy/nix-darwin-amendments
@wizardfrag2 ай бұрын
Thanks very much for this video! Is there a way to get a list of brew packages/casks that are currently installed in a format that would work with the flake? So that we can enable the "zap" option
@aleksanderbang-larsen76282 ай бұрын
@@wizardfrag I haven't watched the video yet. But when i moved over to nix-darwin I used a "brew bundle dump" and got the list of brews, casks and taps. That could then be put into the homebrex part of nix
@danirukun2 ай бұрын
I would still use the Determinate Installer, since it has been shown to survive macOS upgrades much better.
@johnpersson49012 ай бұрын
I’ve been researching Nix on and off for a couple of months and this is hands down the best introduction I’ve come across. Well explained and great production. Looking forward to the next video.
@Ziggurat12 ай бұрын
The best video I have seen is "Ultimate Nix Flakes Guide" by Vimjoyer. It is very good, he has made several videos explaining flakes, but the difference with this one is that you clearly see that he actually understand what he is explaining very well, and he has learned how to teach this information. Another creator with videos that explains things very very clearly is Iogamaster, Another creator with not so many nix videos, but his nix video is impeccably good at explaining is "No Boilerplate" There are many other creators that make good videos, the 3 I listed above I found to be able to explain complex things super clearly
@dreamsofautonomy2 ай бұрын
Thank you! I really appreciate that. This video took me a few goes to film in order to explain it correctly! I'll be doing nixOS soon as well!
@idontknowwhatimdoingwhatistobe2 ай бұрын
@@dreamsofautonomy IDK how different it is but could you do nix on other linux distros than nixos. I have experienced having to wrap apps with nixgl and other issues.
@doce36092 ай бұрын
That intro is 11/10
@dreamsofautonomy2 ай бұрын
Thank you!
@duckner2 ай бұрын
no?
@BhargavaMan2 ай бұрын
I've been thinking of consolidating all my Win/Mac/Linux dotfiles into a nix repo for a while now, I guess once your dotfiles video is up I might finally give it a go. Thanks for this
@purewaterruler2 ай бұрын
Unfortunately nix doesn't work for windows yet
@drishalballaneyАй бұрын
@@purewaterruler there was a nixos wsl right ?
@vicmattos2 ай бұрын
That was awesome!! You've just solved the last problems I've been having with my dotfiles with a tool I've been eager to try. Thanks!!!!
@dreamsofautonomy2 ай бұрын
Thank you so much! I'll do the home-manager video soon which is where some real magic happens!
@zehph8 күн бұрын
@@dreamsofautonomy I wonder what are the benefits of having home manager over having stow symlink the config files?
@nielskersic3282 ай бұрын
Not even 2 minutes and I’m sold already
@RafaelVrecar2 ай бұрын
This is a game changer for how I use macOS. The video is remarkably well done. Looking forward to the next one.
@modernkennnernАй бұрын
I started using NixOS on my Linux laptop this weekend and I was immediately hooked. The fact that it's at least partially available on Mac is amazing
@AshesWake-sf7uw2 ай бұрын
I am a linux user too, but i may get a MAC for my first job soon, this video is a life saver at the absolute best time :D
@oribi3032 ай бұрын
While I love this tech (and your demo of it), I replace my mac every 3-4 years at best, at that point it is actually valuable to have to reconsider apps and settings. I do think this nix setup can be awesome for a developer experience tool, where large teams can manage a baseline for a dev machine that devs can fork from.
@daniel_tennerАй бұрын
Yeah I was thinking the same thing. How often do I install a Mac from zero? Very rarely it turns out.
@brukts336120 күн бұрын
This is true - however, I often get new macbooks as work machines when I change jobs or need to upgrade within the same job. This changes much more frequently than my personal machine. It's also nice to write everything down so you know what's important and what's not. I don't imagine I'll blindly re-use this configuration file, but I'd like to write down the list of programs I use somewhere and this isn't a bad place
@kernel0verflow9192 ай бұрын
Thank you for the video Elliott. I was trying out nixos time to time and it was really hard to get used to. Especially the whole flake and home-manager stuff. I am looking forward to more nix content.
@davidblancoferrandez46472 ай бұрын
The fact that you share your knowledge, and more specifically the way you share it, it is pure gold to me
@dreamsofautonomy2 ай бұрын
Thank you so much
@ChrisGVE21 күн бұрын
Thanks Elliott for this tutorial, I’m now migrating to Nix from Brew and I can’t wait to see your next tutorial about this! Thanks for the good work!
@vimjoyer2 ай бұрын
Awesome video!
@rafidulonnoy2 ай бұрын
following your channel from the arch install video and waiting on this video from the day when i learned you use nix great video as always🤩
@Julien-rc1bi25 күн бұрын
Awesome video many thanks. The timing is perfect. I was just using again my MacBook that I have not used since I moved to nixos and I told myself it's about time I use nix on my Mac. This video was all I needed.
@vlasar58772 ай бұрын
Thanks!
@dreamsofautonomy2 ай бұрын
Thank you so much for the support!!
@brivism2 ай бұрын
Cant wait for the next parts! Awesome video!
@svyatogor2 ай бұрын
I am lost for words, truly amazing piece of content. Can't wait for the next video!
@darcsentor19 күн бұрын
Awesome video, wasn’t getting my head around Nix but you video make it easy!! You have a very clear and understandable approach.
@ddroseКүн бұрын
Thank you for the insights you provided in this videos. Im about to take that leap into nix land.
@elvisluvaton5078Ай бұрын
First I was like, how is this better than brew? But I am glad I continued watching! This seems really great way to setup macOS. Thanks for a great introduction.
@benarcher372Ай бұрын
Fantastic! What a good walk-through. Have implemented all on my MBA M2, and only the 'read -r' was missing 🙂 Thank you so much.
@Finn_ASАй бұрын
Absolute game changer!! I can't wait for your home manager video like managing dotfiles with Nix, all of that put together is just maximum config satisfaction 😩😍
@kooraiber2 ай бұрын
Thank you so much for this in-depth and easy to follow tut! Any idea on when can we expect the next video about dotfilesnix integration?
@dreamsofautonomy2 ай бұрын
Thank you so much for your support! I'll aim to get home-manager video done in the next month! Unsure if I should do a nixOS video before or after though!
@nipunlakshankАй бұрын
This is the best Nix setup video I've ever watched. Waiting for Nix Home Manger 🤞
@kellanstevens2 ай бұрын
I really enjoyed this video, wasn't too technical but also didn't lack detail so I could understand what I was doing as I followed along, I feel like I can finally start learning nix
@a1mer062 ай бұрын
IVE BEEN WAITING FOR THIS VIDEO FOR MONTHS LETS GOOOO
@captive8670Ай бұрын
I was already quite interested by Nix and macOS even tho I didn't owned a MacBook, and this video was perfect to explain how Nix work (even as a NixOS user I learned some things I did not understood before). This video was perfect
@dreamsofautonomyАй бұрын
I have some NixOS based content coming soon!
2 ай бұрын
Great video. I recently move to using nix, got everything running but this video is very helpful. thanks for making it simple and accessible.
@tbuenoАй бұрын
Great video. One small comment on the homebrew configuration: if you decide to use home-manager, you won't have to use the extra homebrew module since home-manager comes bundled with homebrew support, which I think makes the configuration a bit cleaner.
@kamilgoat2 ай бұрын
Awesome, waiting for the home manager vid!
@phucosg2 ай бұрын
Thank you for the comprehensive getting started guide
@hadronomy2 ай бұрын
This is top tier. Will refer to it when I switch to a macbook
@ashhosking2 ай бұрын
Fantastic video, love your work. Looking forward to the follow up videos.
@josh66572 ай бұрын
This is a fantastic guide for Nix. Thank you so much!
@jbaggs622 ай бұрын
really enjoyed and im rolling it out for my stuff, look forward to the follow on video!
@dhavalsavalia2 ай бұрын
Just when I got a new work Mac! Thank you for this!
@mrgingerpapa2 ай бұрын
awesome video! thanks for this. The video really help me getting started with nix after looking at it for a while from the sidelines and just using ansible and brew. Nearly done with migration to nix.
@dreamsofautonomy2 ай бұрын
I'm very glad to hear that!
@xorlop2 ай бұрын
Excellent video! Good job! I think you did a good job explaining everything important to know :).
@dreamsofautonomy2 ай бұрын
Thank you!
@bimgo6182 ай бұрын
Great video! Looking forward to the follow up!
@NeatMemesDotCom2 ай бұрын
A new level of confidence and power - Pantera 1992
@bulba1995Ай бұрын
Спасибо за видео наконец с самого начала все точно и четко обьяснил кто-то ) Отличное видео )
@moritz5842 ай бұрын
Edit: I really like this video and I think it’s a great introduction to nix! Thanks for making it! (Too many angry noobs like me flooding the comment section here) This is like so incredibly complicated tho. Like, sure, I love the declarativity but I don't wanna do a million steps for every configuration change! Isn't there some way to manage these lists automatically? Like, when I want change a setting, why do **I** have to find out what it's called internally and add that to a huge text file, why can't that *just happen* when I change the setting in the settings app? Until this process has been made simpler, I sadly won't switch
@dreamsofautonomy2 ай бұрын
Nix 100% has a steep learning curve. But in my opinion, and after having used it for 6 months, the benefit is well worth the cost.
@RegrinderAlert2 ай бұрын
You are missing the point and lean strongly into hyperbole. If you want to change one setting, it’s usually 1 value inside nix. Done, versioned, easily replicated or transferred to other machines. Sure you can go create a classic dotfiles repository that adds 10 different config filetypes scattered across the file system to version control. But that’s like going back to the stone age. Nix is a must-have nowadays for me. It brings so many advantages to the table that everything else feels almost unusable.
@MarkWilcoxNZ2 ай бұрын
Only sane comment here
@spidLL2 ай бұрын
This looks like a lot like chef. Makes sense if you have to manage a fleet of Mac, otherwise the configuration of your own only machine is done once, the time it takes to do it manually is the same if not less. But then what if you buy a new machine in 4 years? Are you sure you’ll keep the configuration up to date for 4 years? I appreciate your video, though, I’m sure it’s a good solution for some use case.
@RegrinderAlert2 ай бұрын
@@spidLL Of course you keep the config up to date. By definition. Since making changes is done my changing the configuration. State is very tightly controlled on a correctly setup Nix installation. Personally I use impermanence with ZFS snapshots so state is wiped on reboot except the things I want to keep explicitly.
@niksingh7102 ай бұрын
Needed this as I am an hardcore linux user with nixOs but will need to use mac in future too.
@MohitMayankJha2 ай бұрын
Great (simple) tutorial, would appreciate a similar one for a Linux machine. Even a gist would do. Thanks, keep up the awesome work.
@dreamsofautonomyАй бұрын
I'll be doing nixOS soon as nix as well!
@MohitMayankJhaАй бұрын
@@dreamsofautonomy amazing, thank you! Would you also be covering how to just use the home manager (or something like nix-darwin on Linux) for people who wouldn’t want a full blown nixOS?
@flokkq79312 ай бұрын
you said you didnt like this video? 5s in and its already a banger
@flokkq79312 ай бұрын
ey, big-man. That was a good video! keep going. The nix content is lovely, thanks
@dreamsofautonomy2 ай бұрын
Thank you! I really appreciate that dude. I spent far too long on this one and I ended up letting perfect be the enemy of done. I need to get back into the habit of releasing videos more often
@Daviddd102 ай бұрын
I saw hammerspoon installed, would love a video to see how you use it. Do you use a hyper key on your setup?
@andressalazargaleano64192 ай бұрын
you never stop amazing me
@jessevdp_18 күн бұрын
Super informative video! I want to try this out soon! The link to the final configuration seems to be missing from the description. Any chance you’ve got it lying around?
@frankiev17852 ай бұрын
Doing this on my next Macbook Pro! Awesome video.
@dreamsofautonomy2 ай бұрын
You can do it on your current one as well!
@frankiev17852 ай бұрын
@@dreamsofautonomy I thought about it. Currently, I have two different projects going with building a Nix based hypervisor, based on your other homelab setup video, and a TrueNAS Scale Baremetal build. Adding on to those two may be more than I can handle all at once. Will have to explore the Mac situation after that!
@PygmySurfer2 ай бұрын
If you do it on your current MacBook, swapping to the new on will be so much easier.
@erwin7572 ай бұрын
My MacBook Pro is my working machine. I am afraid it will brick it or something 😅
@zxcxcsdfasdfasfАй бұрын
Excellent walkthrough thanks!
@ChrisLipinski1132 ай бұрын
This video might be the final nudge to get me to try Nix. Really appreciate the work you put into this. Thanks for sharing!
@benarcher372Ай бұрын
Eagerly awaiting the home-manager part. This is really hard to get working!
@dreamsofautonomy29 күн бұрын
I appreciate the patience! I've been swamped with some other projects but will be getting on it soon!
@benarcher37229 күн бұрын
@@dreamsofautonomy No worries. I will in the mean time revisit some of your old videos! Take your time, don't spoil us 🙂
@marekh192 ай бұрын
❄️❤
@dreamsofautonomy2 ай бұрын
Thank you so much for the support!!!
@stroiman.development2 ай бұрын
A word of warning when using Apple Silicon. DO NOT FORGET TO CHANGE THE HARDWARE ARCHITECTURE before running any command. I failed to change that before running the `nix run .... nix-darwin ...` command. Changing the architecture after the fact, I was already in a bad state. When I later changed the architecture, nothing worked, everything failed with a bad architecture error message. I ended up completely removing nix, and reinstalling. This again didn't work because I should apparently have uninstalled nix-darwin first. So there were some SSL certificate lookup issues, which took some time figuring out. This was a big hassle that would have been avoided if I had properly followed your steps, and change the hardware architecture immediately. (Problem of first watching the video to the end, and then decide to try it myself after that, just fast-forwarding to the important bits).
@anshumansingh32522 ай бұрын
PLEASE MAKE A VIDEO ON YOUR LINUX/NIX OS SETUP it looks soooo good
@dreamsofautonomy2 ай бұрын
Absolutely! A video is coming soon 😁
@Jarek.2 ай бұрын
Capabilities of the tool are amazing. But I didn't like how intrusive it is and how much it modified the system.
@zachzimmermann52092 ай бұрын
Unfortunately that is the point of nix. There's an even more 'intrusive' version called NixOS (a linux distro), where everything on the operating system is managed by nix.
@dhupee2 ай бұрын
Iirc there's a github gist to enable you to install nix but on your home directory, I'm not sure how it will impacted your setup but it's quite useful especially for non-sudo user
@Redyf2 ай бұрын
Nix mentioned!
@RenderingUser2 ай бұрын
Not just macos. every linux distro, and windows (wsl) should all use nixpkgs
@SharunKumar2 ай бұрын
Is there a video out there on how to set it up on WSL?
@NatoBoram2 ай бұрын
It would be awesome to have it on Windows, too
@HUEHUEUHEPony2 ай бұрын
Everyone should use guix
@mgord95182 ай бұрын
@@HUEHUEUHEPonyWhat does it bring that justifies more fragmentation?
@Rundik2 ай бұрын
This is both waste of time and disk space
@zhytedark28592 ай бұрын
Yeah we would love to see managing dotfiles with nix ! I'm going to buy a mac soon and it would so nice to be prepared for a full setup already to syn it with my current linux laptop
@dreamsofautonomy2 ай бұрын
Absolutely! Home manager has been really cool to get set up and working, and for some configurations it works like stow!
@zhytedark28592 ай бұрын
@@dreamsofautonomy I'm currently working on it since your video, it's really great ! However not easy to have good practices. I can't wait to see your configuration (how you configure zinit for instance)
@darylfortney808115 күн бұрын
Dude is stylish in black ... at least he knows good headphones
@anonymousXYZ659Ай бұрын
Been looking for something like this, to sync my personal and work mac.
@enterusername77462 ай бұрын
Wow. Very nice and complete intro to nix configuration on MacOS! Are there any reasons you are not using the Determinate Nix Installer?
@ayato742927 күн бұрын
Do you have any plans on when the dotfile video will come out?
@juanjsepulveda2 ай бұрын
Very good video, I'll try Nix
@darthkielbasa2 ай бұрын
I’ve slept on Nix, man. Incorrectly I assumed GUI apps were excluded. I may spin up a VM and give this a shot.
@Abakum1Ай бұрын
Nix is my favorite package manager to use on NixOS
@bastiana36112 ай бұрын
Awesome video, I think I'll show this to a mac friend and tell him to join me on the dark side.
@drewbuntooАй бұрын
The vocal effect change at 13m is so jarring
@byteops2 ай бұрын
nice! waiting for more ;)
@RazineBensari2 ай бұрын
damn boyy! that is nice
@RazineBensari2 ай бұрын
I just need a linux laptop to keep in sync :p Jokes aside, that would be a good use case for workpersonal computers sync
@flamingfire02 ай бұрын
HE BE BACK
@dreamsofautonomy2 ай бұрын
We're so back!
@erickvasquez56522 ай бұрын
OMG!! This is so awesome
@ben612 күн бұрын
The `Videos final nix flake:` is missing in the description I was drinking from a firehose the entire video, but I understand there's so much to cover! Thank you A bit of feedback for you :): the blurring or complete removal of the context around code snippets is frustratingly difficult to follow. A lot of rewinding to get where exactly to put it. Sometimes the context of the code snippet only appears for
@martinlarsson66212 ай бұрын
Great video, I've been wanting to get into Nix for so long but haven't put aside the time to do it. This might just be the push I needed! Question, are you using NixOS on Linux now as well or only using the Nix package manager?
@dreamsofautonomy2 ай бұрын
Thank you! I'm now using nixOS on Linux! But I took about 6 months to migrate over, mainly due to the learning curve!
@martinlarsson66212 ай бұрын
@@dreamsofautonomy That's awesome, if you ever feel like making nixOS videos, I'll be first in line to see them! :)
@florian63852 ай бұрын
Currently I have a common Ansible script to setup all my machines: macOS, Debian and Windows. Nix seems very interesting, now I want to migrate my Ansible script to Nix 😄 Is Nix really compatible with Windows ? (if it is, then it is aweeeesome) For example when you add the Alacritty app, it means that I can execute it the same way on Linux, Windows and macOS ?
@lemontec2 ай бұрын
15:58 feel like there should be a cli command to install and add to config automatically
@AntonelloM2 ай бұрын
very nice tutorial, thanks a lot!
@RichardJActon2 ай бұрын
Very nice guide to point mac people to.
@stroiman.development2 ай бұрын
8:43 I guess using the unstable is not a big problem; as you would be able to roll back to a previous working configuration if a package breaks, right? Can it also handle downgrading Homebrew packages? I had an issue with homebrew, after an upgrade I couldn't connect to Heroku Postgres databases (didn't notice right away, as I'd very rarely log on to production servers). Downgrading was annoying, don't think I got it fixed, until it was actually fixed in the homebrew-installed versions. (using other means to connect)
@dreamsofautonomy2 ай бұрын
That's correct! Updates only take place on nix packages after you run nix flake update. Additionally you can rollback to a previous generation. Homebrew offers much less guarantees which is why I prefer to use nix packages over the homebrew ones.
@JunYamogАй бұрын
Thanks this was well presented. I might try Nix, only drawback would be the multiple users created for a MDM corporate Mac. Do all of them require privilege access, or just 1 of them and the rest are like delegate/helper users?
@AMusset2 ай бұрын
Thank you for yet another very informative video! Is there any downside to using Nix ? i.e. compatibilty, clash with MacOS features etc ?
@thehyperduck902 ай бұрын
Bro you're the best out there. Is there any possibility for you to make a video about setting up an environment based nixos flake in the cloud that is basically a frontend and backend that is extensible with a deployment tool like Terranix or Colmena?
@TakeThisLove2 ай бұрын
Great video. I've been a Nix/NixOS for quite some time. What color scheme do you use. It matches MacOS perfectly
@dreamsofautonomy2 ай бұрын
Tokyo night!
@damienlachaume2 ай бұрын
Thank you very much, this is very interesting. I’ll definitely give it a try. Since I'm not starting from a clean installation, would it be ok to uninstall Homebrew and its related dependencies in order to manage everything with Nix instead? Can't wait to see the next video!
@dreamsofautonomy2 ай бұрын
You can migrate easily as well! No need to uninstall everything. My pinned comment has the changes you'll need!
@nickiascerinschi2062 ай бұрын
Looking at thumbnail 😊 then looking at 20:00 😢
@attentioncestpaslegal78472 ай бұрын
Pure gold content
@Kunal-k-u-m-a-r2 ай бұрын
Accha ji 😂
@sirwnstn2 ай бұрын
Very informative video. I wonder how Ansible would stack up against Nix. Jeff Geerling uses Ansible in a very similar way to setup his Macs.
@alpipegoАй бұрын
I was wondering, what the lower case `-r` flag does for the cp command and this is what the man page says. Are you using it as `-RL`? Historic versions of the cp utility had a -r option. This implementation supports that option, however, its behavior is different from historical FreeBSD behavior. Use of this option is strongly discouraged as the behavior is implementation-dependent. In FreeBSD, -r is a synonym for -RL and works the same unless modified by other flags. Historical implementations of -r differ as they copy special files as normal files while recreating a hierarchy.
@PatternerАй бұрын
how do you feel about the recent "PURGE"?
@NickBouwhuisАй бұрын
Very cool. And just in time too. Going to buy a new MacBook soon and this is a great time to play around with Nix. Already setup Nix-Darwin in a VM, defined the apps I like. So when I take the new Mac out of the box I just clone my git repo and I'm ready to go. One question: I could not find the setting to disable the window gaps that Sequoia introduced. Has anyone found the correct setting to define in the flake?
@raykandersbreivik658Ай бұрын
great video very useful set up process thank you very much. I'm new to package management systems and never used home-brew before, what's the difference between "brew"and "cask" installations. kind regards
@AbhinavKulshreshtha2 ай бұрын
18:08 what happened here? Are you installing nerdfont under a different name? Or is this a feature to download and install an external font?
@maxtester88242 ай бұрын
Thanks for this fantastic video! Is there a relatively eaasy answer to the question of how ansible would compare to nix package manager? Did you ever compare?
@dreamsofautonomy2 ай бұрын
I've still not yet tried Ansible unfortunately! I'll have to give it a go soon and do a comparison!
@wi1h2 ай бұрын
even though ansible is all yaml, it's entirely imperative. if you've worked with github actions before, it's basically exactly that. you write a yaml file that basically goes "hey, run these jobs in this order". it's better than regular shell scripting since it's cross platform and it abstracts away the actual shell commands you have to run, but at the end of the day it's an imperative language. you can get pretty good reproducibility and whatnot by pinning versions and such, and it certainly has its uses, but nix is a whole other beast
@Warren_ZhАй бұрын
This is really well-done as all others said and helpful for someone just moves from linux to mac. Could I possibly check how I could further modify the program such as neovim? thanks!
@cwirz13 күн бұрын
Any idea why nix always downloads the homebrew apps on re-execution of the nix run command and only then checks if its installed and how to fix that? This takes a lot of time each time i update the flake file.
@ryullulalaАй бұрын
What's the difference between these two approaches, and how can I fix this issue? Is there a recommended way to install and use mas in my nix configuration? I'm getting a "mas command not found" error. ``` homebrew = { enable = true; onActivation.cleanup = "zap"; brews = [ "mas" ]; ``` However, when I use this configuration, I can run the mas command: ``` environment.systemPackages = with pkgs; [ mas ] ```
@dreamsofautonomyАй бұрын
Most likely you don't have the homebrew added to your .profile or .zshrc depending on which one you're using! Make sure to add it using PATH="/opt/brew:$PATH" I'll add a note into the video amendments.
@anikethdas98Ай бұрын
Thanks a lot for the video. I have a question though. Does specifying your applications declaratively like you did here stop you from updating your apps on MacOS via the app's buil-in app updation features? I get pop ups if i click check for updates on some apps and with the limited experience I have, I am still able to update my apps like that. Is this supposed to happen? If not, what might I be doing wrong?
@vslow4795Ай бұрын
Thanks for the detailed video. Strange, but upon each rebuild nix asks me to provide the password. What could be the reason?
@duavinciАй бұрын
Is it possible to have something similar on linux or WSL2 to be precise?