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".
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
@@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
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.
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
@@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.
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
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.
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.
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
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.
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
@@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)
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
I achieved the same using Ansible, dosent matter macOS or Linux (I can create a 1:1) setup under 2 minutes. The problem I have with nix is the separate volume that takes up tons of space and gui apps dosent show in launcher in macOS. But you do you!
@@dreamsofautonomyThanks for getting back. I did watch the entire video and had a script myself to link applications recursively inside NixApps (Not with the flakes way to doing things though). What i faced was if an applications were to be updated manually for example, the Symlinks would change and get corrupted and the entire directly needs be re-synced via scripts as its re-generated. This is a Ice breaker at-least for me that this is not handled natively. So Brew is my choice of poison.
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 ?
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.
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!
Your dotfiles are not modular or easily transferable to other machines since there is no module system with options. You cannot rollback to working versions. You have none of the advantages of nixpkgs. You can’t cross-reference values inside your config. Your bash scripts are imperative and have no undo. The list goes on. Different beast.
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?
@@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!
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!
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?
absolutely amzing !! I was looking for such video for quiet sometime!!!... Kindly expedite teh home manager video and also how to use the NIX in Arch linux... as wel
I switched from Macports to home brew years ago. I’ll need to look at migrating to this. A curious how much sequoia fucks it up though lol. Edit: nvm lol. Thanks for checking sequoia.
Amazing video, but unfortunately very complex for my use case. How does Nix would be different to Ansible for this fresh configuration routine? I miss having something like Scoop, a package manager for Windows systems. It's way more advanced and refined than Homebrew, with some Nix-like features like the simple app version change. At the same time, Scoop is easier to use than homebrew itself!
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?
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
Elliott, I request you to please create a nix setup video for nixOS (linux). I know the resources such as docs and videos of vimjoyer, but all of it seems overwhelming to me. I am happy with my current setup in arch using paru for packages and stow for dotfiles management. But I really want to get nixING. I want to use the superpowers of nix but I don't own a Mac. Help me pwease. Can I follow this tutorial for non Mac computers? Is Darwin only for mac? Help me 🥺
I tried this a couple of weeks ago and gave up. Not because it was difficult, but because I don't want a dedicated volume for Nix and it's just way overkill, and it can't remove homebrew packages even when removed from your nix configuration. I wouldn't want to control any of the system settings either, so brew bundle is good enough for me. Though I was intrigued by using home-manager to replace stow, but as far as i'm aware it can be used standalone without nix-darwin.
I have a pretty simple bash script that downloads brew, install all my packages from a Brewfile, sets all system settings using "defaults write", symlinks my dotfiles without all that nix complexity. I don't see the appeal personally.
I’m interested in this! I already have a Brewfile, but haven’t managed to automate system settings and dot files. I think I could make something work, but I’d rather learn from someone already using it.
You are missing the point then. Nix has a myriad of advantages. Some are part of the nixos/darwin module system (homebrew can’t manage this), some are due to home-manager (homebrew does nothing like that) and homebrew is a joke compared to nixpkgs. And don’t forget about dev environments via Nix flakes - that’s the killer feature of the whole ecosystem and vastly superior to anything else. All those advantages combine seamlessly if you go full NixOS (or nix-darwin on Mac).
I'm guessing you keep one config for macos and one for linux (and I guess one for wsl/same as linux)? Tempted to set this up on my linux work laptop and macos client laptop to switch off using just brew
I keep 2 separate flakes currently but they share similar configuration. It is possible to have a single flake as well which I'll try and do a video on!
Well, I just use macos, install my stuff once (brew, appstore, etc.), and then back my entire system up on my NAS via time machine regularly. No additional dependencies on some software, config files, dotfiles, whatnot to maintain, all my passwords and other additional stuff is maintained better this way than the tool in this video does. It just works. Not sure what problem this solves, apart from dependency on another fantastic tool that does less than what it is claiming, for a lot more hype?
I believe I mentioned in the video, but keeping my environment consistent across both macOS and Linux is a big one. Time machine just isn't able to do that I'm afraid. Additionally, nix shell, nix develop, being able to install multiple versions of software etc are all things nix can do that you can't easily achieve otherwise.
Can NIX do the same thing in reverse? I am kind of tired of all these ansible level managers and configurators, what I am looking for is the other way around like if I am having an already set and customized system, than automatically generate the current config, or have the selection of what I want and not want to export, than go to another machine and port all the settings and setup there to cerate an identical setup, but not a DD level copy!
I've been very tempted with Nix and nix-darwin in particular, However, besides the steep learning curve and the amount of complexity introduced, I'm not really able to find someone how can in plain English give me the cons of using nix-darwin. Surely, there must be some. What about the non-standard FHS? What kind of troubles may that introduce? What are the resource penalty, surely there must be some memory penalty for storing all the snapshots? I willing to dip my toes into Nix but I'm afraid that this is just some hype train that may pass in few months
And how is dev work affected by Nix? I guess that I want to have a flake.nix file for each and every project? How does this affect cooperation with other devs that are not on Nix system? I cannot seem to find meaningful answers to those types of questions.
Nix Darwin shouldn't impact any FHS, that's mainly a consideration on nixOS. Honestly there's very few cons with using it on MacOS other than creating a new volume and user accounts. That can be a bit much for some people. As for development environments, you can make use of a flake.nix which some repos provide, in order to use the nix develop command which enables a temp environment with all of the dependencies installed. For me, Ive spent about 6 months with Nix and NixOS and am convinced it's here to stay, of course that's just my opinion and it could quite easily be a fad still.
Love the video, but when i try to run the nix run nix-darwin part i keep getting an error: path does not exist? Edit: I have no idea what i did, but after intializing the dir with git it somehow worked
Good job! If you set up the directory with git you'll need to make sure the files are tracked! There is a way to disable that but I prefer the default behavior!
Exactly. Installing nix Darwin will prune my current apps/configurations/homebrew apps or what? If I have for example neovim or wezterm terminal installed with homebrew can I still use it? If yes, how do I migrate app to be managed via nix pkgs without losing the data?
You do not need to use nix Darwin on a fresh machine. You can use it on an existing one. If you add autoMigrate = true; on the homebrew configuration and don't set the onActivation to zap, then you should be set!
@@ecosse31 i did this to my macbook, you don't lose anything. it won't uninstall anything you have installed, and even after the fact you can still install apps normally (but i suppose why would you). most apps store their data in ~/Library, so you should be able to safely uninstall them normally (brew remove/delete /Applications/*.app) and then install them with nix, and the new install will have the same data as previously as for homebrew, i think the easiest thing is to setup homebrew in your nix config and just copy everything over from `brew list`
@@dreamsofautonomy That's awesome for homebrew apps! What about .config directory configuration for apps and apps installed via DMG installer or Mac App Store? Will they be still available or they going to dissapear?
Maybe I missed it, but could you use Nix to install paid Mac apps that aren’t available on the Mac App Store, or in other package repositories? For example, something like Capture One.
Is it possible to do the same thing with WSL? including the possibility of keeping WSL and a Linux distro in sync? or does the lack of a module like darwin for WSL make this impossible? I'm having trouble setting zsh as the default shell on the system. On WSL I'm using home manager to try to do this
I agree. My camera was messed up for a lot of the shots on this video as I had auto white balance set up! I tried to match it best but it didn't work out. Mistake on my end which shouldn't happen again!
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".
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
@@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
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.
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
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!
@@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.
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
That intro is 11/10
Thank you!
no?
Not even 2 minutes and I’m sold already
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.
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!!!!
Thank you so much!
I'll do the home-manager video soon which is where some real magic happens!
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
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🤩
Awesome video!
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.
The fact that you share your knowledge, and more specifically the way you share it, it is pure gold to me
Thank you so much
Great video. I recently move to using nix, got everything running but this video is very helpful. thanks for making it simple and accessible.
Cant wait for the next parts! Awesome video!
nix looks great, i will adopt nix for my next macbook. I'll stick with homebrew because it works for me, for now
This is top tier. Will refer to it when I switch to a macbook
Awesome, waiting for the home manager vid!
Just when I got a new work Mac! Thank you for this!
Needed this as I am an hardcore linux user with nixOs but will need to use mac in future too.
Thank you for the comprehensive getting started guide
Great video! Looking forward to the follow up!
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
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.
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.
Fantastic video, love your work. Looking forward to the follow up videos.
A new level of confidence and power - Pantera 1992
Excellent video! Good job! I think you did a good job explaining everything important to know :).
Thank you!
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
Absolutely! Home manager has been really cool to get set up and working, and for some configurations it works like stow!
@@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)
IVE BEEN WAITING FOR THIS VIDEO FOR MONTHS LETS GOOOO
you said you didnt like this video? 5s in and its already a banger
ey, big-man. That was a good video! keep going. The nix content is lovely, thanks
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
Very good video, I'll try Nix
I saw hammerspoon installed, would love a video to see how you use it. Do you use a hyper key on your setup?
This video might be the final nudge to get me to try Nix. Really appreciate the work you put into this. Thanks for sharing!
I achieved the same using Ansible, dosent matter macOS or Linux (I can create a 1:1) setup under 2 minutes.
The problem I have with nix is the separate volume that takes up tons of space and gui apps dosent show in launcher in macOS.
But you do you!
I show how to set up gui apps in the launcher! You should watch the video if that's your concern.
@@dreamsofautonomyThanks for getting back. I did watch the entire video and had a script myself to link applications recursively inside NixApps (Not with the flakes way to doing things though). What i faced was if an applications were to be updated manually for example, the Symlinks would change and get corrupted and the entire directly needs be re-synced via scripts as its re-generated. This is a Ice breaker at-least for me that this is not handled natively. So Brew is my choice of poison.
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 ?
Capabilities of the tool are amazing. But I didn't like how intrusive it is and how much it modified the system.
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.
very nice tutorial, thanks a lot!
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?
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!
I’ve slept on Nix, man. Incorrectly I assumed GUI apps were excluded. I may spin up a VM and give this a shot.
PLEASE MAKE A VIDEO ON YOUR LINUX/NIX OS SETUP it looks soooo good
Absolutely! A video is coming soon 😁
Nix mentioned!
Not just macos. every linux distro, and windows (wsl) should all use nixpkgs
Is there a video out there on how to set it up on WSL?
It would be awesome to have it on Windows, too
Everyone should use guix
@@HUEHUEUHEPonyWhat does it bring that justifies more fragmentation?
This is both waste of time and disk space
I have all of this accomplished and more with dotfiles and a bash script. So I have to wonder…did I miss something that makes Nix superior?
Your dotfiles are not modular or easily transferable to other machines since there is no module system with options. You cannot rollback to working versions. You have none of the advantages of nixpkgs. You can’t cross-reference values inside your config. Your bash scripts are imperative and have no undo. The list goes on. Different beast.
damn boyy!
that is nice
I just need a linux laptop to keep in sync :p
Jokes aside, that would be a good use case for workpersonal computers sync
Looking at thumbnail 😊 then looking at 20:00 😢
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?
Doing this on my next Macbook Pro! Awesome video.
You can do it on your current one as well!
@@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!
If you do it on your current MacBook, swapping to the new on will be so much easier.
Wow. Very nice and complete intro to nix configuration on MacOS! Are there any reasons you are not using the Determinate Nix Installer?
you never stop amazing me
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.
I remember nix would thoughtfully create 32 users for you on macOS, right?
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!
You can migrate easily as well! No need to uninstall everything. My pinned comment has the changes you'll need!
Awesome video, I think I'll show this to a mac friend and tell him to join me on the dark side.
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?
Thank you!
I'm now using nixOS on Linux! But I took about 6 months to migrate over, mainly due to the learning curve!
@@dreamsofautonomy That's awesome, if you ever feel like making nixOS videos, I'll be first in line to see them! :)
Thanks!
Thank you so much for the support!!
absolutely amzing !! I was looking for such video for quiet sometime!!!... Kindly expedite teh home manager video and also how to use the NIX in Arch linux... as wel
why tf would you use nix on arch??? Just use NixOS
Home manager video expedited!
@@dreamsofautonomy thanking you kindly!!
Pure gold content
Accha ji 😂
I switched from Macports to home brew years ago. I’ll need to look at migrating to this. A curious how much sequoia fucks it up though lol. Edit: nvm lol. Thanks for checking sequoia.
Very nice guide to point mac people to.
Amazing video, but unfortunately very complex for my use case. How does Nix would be different to Ansible for this fresh configuration routine?
I miss having something like Scoop, a package manager for Windows systems. It's way more advanced and refined than Homebrew, with some Nix-like features like the simple app version change. At the same time, Scoop is easier to use than homebrew itself!
Great video. I've been a Nix/NixOS for quite some time.
What color scheme do you use. It matches MacOS perfectly
Tokyo night!
HE BE BACK
We're so back!
The final flake is missing and it would help me a lot
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?
I've still not yet tried Ansible unfortunately! I'll have to give it a go soon and do a comparison!
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
3:37 The effort graph should be logx not e^x, cause its harder/more effort in starting and smooth sailing when you become a pro
amegamazing
Elliott, I request you to please create a nix setup video for nixOS (linux). I know the resources such as docs and videos of vimjoyer, but all of it seems overwhelming to me. I am happy with my current setup in arch using paru for packages and stow for dotfiles management. But I really want to get nixING. I want to use the superpowers of nix but I don't own a Mac. Help me pwease.
Can I follow this tutorial for non Mac computers? Is Darwin only for mac? Help me 🥺
I will be doing a video on nixOS soon! I promise.
yeah sure, instead of doing work on a laptop, let's dive in an endless cycle of configuring your environment....
Hypsters😊
False dichotomy
Found the project manager.
Its not endless
@@dreamsofautonomyI’ll be done in one sprint hahahah
Hi thank you for video!
One thing remains unclear to me - how do you pin to dock application installed from appstore?
I tried this a couple of weeks ago and gave up. Not because it was difficult, but because I don't want a dedicated volume for Nix and it's just way overkill, and it can't remove homebrew packages even when removed from your nix configuration. I wouldn't want to control any of the system settings either, so brew bundle is good enough for me. Though I was intrigued by using home-manager to replace stow, but as far as i'm aware it can be used standalone without nix-darwin.
It can remove homebrew packages when using the zap onActivation option! I mention it in the video!
@@dreamsofautonomy I didn't watch the whole thing 🫣
My dude how do you keep reading my mind. First it was obsidian , now it is this.
It's interesting, has have more options than Brew for sure, but I don't see that reason do change, at least yet.
He’s still using Homebrew 20:00
try adding AeroSpace to your setup :)
I'll definitely give this a go!
Banana, Banana, Banana, I want that banana cursor !!, Banana, Banana, get me that banana !
Would you be willing to do a video like this for starting with NixOS and/or a regular linux distro?
Absolutely! I'll do a nixOS from scratch one soon.
I wish something like this would be available for Windows, DSC is nowhere near Nix...
noice
I have a pretty simple bash script that downloads brew, install all my packages from a Brewfile, sets all system settings using "defaults write", symlinks my dotfiles without all that nix complexity.
I don't see the appeal personally.
I’m interested in this!
I already have a Brewfile, but haven’t managed to automate system settings and dot files.
I think I could make something work, but I’d rather learn from someone already using it.
You are missing the point then. Nix has a myriad of advantages. Some are part of the nixos/darwin module system (homebrew can’t manage this), some are due to home-manager (homebrew does nothing like that) and homebrew is a joke compared to nixpkgs. And don’t forget about dev environments via Nix flakes - that’s the killer feature of the whole ecosystem and vastly superior to anything else.
All those advantages combine seamlessly if you go full NixOS (or nix-darwin on Mac).
@@motionblurgamer My dotfiles are at jaycedam/mac-setup
I wonder whether using a non-default package manager would introduce any bugs or issues at all
I'm guessing you keep one config for macos and one for linux (and I guess one for wsl/same as linux)? Tempted to set this up on my linux work laptop and macos client laptop to switch off using just brew
I keep 2 separate flakes currently but they share similar configuration. It is possible to have a single flake as well which I'll try and do a video on!
Well, I just use macos, install my stuff once (brew, appstore, etc.), and then back my entire system up on my NAS via time machine regularly. No additional dependencies on some software, config files, dotfiles, whatnot to maintain, all my passwords and other additional stuff is maintained better this way than the tool in this video does. It just works. Not sure what problem this solves, apart from dependency on another fantastic tool that does less than what it is claiming, for a lot more hype?
I believe I mentioned in the video, but keeping my environment consistent across both macOS and Linux is a big one. Time machine just isn't able to do that I'm afraid.
Additionally, nix shell, nix develop, being able to install multiple versions of software etc are all things nix can do that you can't easily achieve otherwise.
Well not everyone has NAS.
great video... reason I havent used nix is the syntax is horrible... they could have done so much better.
I run into packages which did not work on aarch64, metasploit for example. 🙁
Using >alacrittt
>Not wezterm
Can NIX do the same thing in reverse? I am kind of tired of all these ansible level managers and configurators, what I am looking for is the other way around like if I am having an already set and customized system, than automatically generate the current config, or have the selection of what I want and not want to export, than go to another machine and port all the settings and setup there to cerate an identical setup, but not a DD level copy!
can you manage ssh keys from nix? like store them encrypted and decrypt on install
I've been very tempted with Nix and nix-darwin in particular, However, besides the steep learning curve and the amount of complexity introduced, I'm not really able to find someone how can in plain English give me the cons of using nix-darwin. Surely, there must be some. What about the non-standard FHS? What kind of troubles may that introduce? What are the resource penalty, surely there must be some memory penalty for storing all the snapshots? I willing to dip my toes into Nix but I'm afraid that this is just some hype train that may pass in few months
And how is dev work affected by Nix? I guess that I want to have a flake.nix file for each and every project? How does this affect cooperation with other devs that are not on Nix system? I cannot seem to find meaningful answers to those types of questions.
Nix Darwin shouldn't impact any FHS, that's mainly a consideration on nixOS.
Honestly there's very few cons with using it on MacOS other than creating a new volume and user accounts. That can be a bit much for some people.
As for development environments, you can make use of a flake.nix which some repos provide, in order to use the nix develop command which enables a temp environment with all of the dependencies installed.
For me, Ive spent about 6 months with Nix and NixOS and am convinced it's here to stay, of course that's just my opinion and it could quite easily be a fad still.
@@dreamsofautonomy thanks for the reply! I was not aware that FHS was only affected on NixOS.
I might try it out! But perhaps on a VM first 😅
That's good to know because I like to keep tabs on what aging hipsters like and don't like about computers.
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?
Can you share you tmux config please? :)
when are going to do the linux side of configuration?
Very soon! I'll start videos on nixOS and nix shortly!
Love the video, but when i try to run the nix run nix-darwin part i keep getting an error: path does not exist?
Edit: I have no idea what i did, but after intializing the dir with git it somehow worked
Good job! If you set up the directory with git you'll need to make sure the files are tracked! There is a way to disable that but I prefer the default behavior!
do you have to run nix-darwin from a fresh machine ? i have an already configure machine I want to swap over.
Exactly. Installing nix Darwin will prune my current apps/configurations/homebrew apps or what? If I have for example neovim or wezterm terminal installed with homebrew can I still use it? If yes, how do I migrate app to be managed via nix pkgs without losing the data?
You do not need to use nix Darwin on a fresh machine. You can use it on an existing one.
If you add autoMigrate = true; on the homebrew configuration and don't set the onActivation to zap, then you should be set!
@@ecosse31 i did this to my macbook, you don't lose anything. it won't uninstall anything you have installed, and even after the fact you can still install apps normally (but i suppose why would you). most apps store their data in ~/Library, so you should be able to safely uninstall them normally (brew remove/delete /Applications/*.app) and then install them with nix, and the new install will have the same data as previously
as for homebrew, i think the easiest thing is to setup homebrew in your nix config and just copy everything over from `brew list`
@@dreamsofautonomy That's awesome for homebrew apps! What about .config directory configuration for apps and apps installed via DMG installer or Mac App Store? Will they be still available or they going to dissapear?
I feel like Nix only appeals to a very specific niche of users.
The same ones that would have used gentoo and later arch Linux…
I did used to use arch, btw 😉
Agreed, it's not for everyone. Having multiple computers however, it's been a joy to keep the environments in sync
Will most of this info also work for Linux?
my main problem is to write my configuration in the nix language
Cool stuf
Good: Nix.
Bad: MacOs.
Maybe I missed it, but could you use Nix to install paid Mac apps that aren’t available on the Mac App Store, or in other package repositories? For example, something like Capture One.
I am also interested in how to deal with this. In my case I need to install Alfred and activate it with my power pack serial
Is it possible to do the same thing with WSL? including the possibility of keeping WSL and a Linux distro in sync?
or does the lack of a module like darwin for WSL make this impossible?
I'm having trouble setting zsh as the default shell on the system.
On WSL I'm using home manager to try to do this
Yes, just lookup NixOS WSL. I am currently running it on my win10 machine and it works perfectly.
That blue filter is sometimes too much on your camera
I agree. My camera was messed up for a lot of the shots on this video as I had auto white balance set up! I tried to match it best but it didn't work out. Mistake on my end which shouldn't happen again!
what about ssh and git setup?