Nix Darwin Turned My Mac into a Fully Automated Machine

  Рет қаралды 50,927

DevOps Toolbox

DevOps Toolbox

Күн бұрын

Пікірлер: 90
@devopstoolbox
@devopstoolbox 4 ай бұрын
Join 2000+ subscribers getting one dev/sec/ops tip every Friday: signup.omerxx.com
@anthonyoleinik6472
@anthonyoleinik6472 4 ай бұрын
Welcome to the rabbit hole
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@anthonyoleinik6472 😅🥲
@Taddy_Mason
@Taddy_Mason 4 ай бұрын
This rabbit hole is very very deep
@simian3455
@simian3455 4 ай бұрын
I'm not a dev or programmer by any stretch of the imagination... but I dove in face-first into NixOS... it's true you can't break this system... because... IT BROKE ME 🤡
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@simian3455 😆
@simonlauer9379
@simonlauer9379 3 ай бұрын
what’s that scratchpad like terminal you opened?
@JoshMedeski
@JoshMedeski 4 ай бұрын
My community has been telling me this is the way to go, thanks for the clear introduction to Flakes on macOS!
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@JoshMedeski ❤️
@wojciech-kulik
@wojciech-kulik 4 ай бұрын
What a perfect timing, recently I watched some videos about nixOS out of curiosity, but I didn't know that it's also available on macOS, what a surprise!
@1234minecraft5678
@1234minecraft5678 4 ай бұрын
I switched to nix a few months ago and i am absolutely lovin it. Especially stylix and home manager.
@347Online
@347Online 4 ай бұрын
Small thing: You technically don't need the .config/nix/nix.conf, as you can configure these with the nix.settings attrset, e.g. nix.settings = { experimental-features = ["nix-command" "flakes"]; }; This saves me having to set up nix.conf on every machine EDIT: Damn, I knew I should've finished the video before commenting 😅
@itisciprian
@itisciprian 4 ай бұрын
nix is a true rabbit hole - since I've discover it I change my both machines to it - Mac and arch linux and changing all my config files to it. Chapeau and keep up with the series . Desk setup tour when?
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@itisciprian soon! In the queue 😅
@mischavandenburg
@mischavandenburg 2 ай бұрын
Looks interesting! For me the question arises, how much time does one save with this actually? How often does one change Macs? I can envision myself spending at least one entire weekend or more trying to get this to work properly. I expect my Mac to last at least 7 years, and when I change over to another one, I would probably just start from scratch or export my list of brew packages if i'm feeling lazy. Then I pull my dotfiles, and the rest is all containerized or cloud synched. I aspire to have a "Stateless Workstation". Basically everything important is backed up to GitHub, my NAS or cloud synched. This way I can even change between different operating systems relatively easily.
@devopstoolbox
@devopstoolbox 2 ай бұрын
@@mischavandenburg I think those who would benefit such a setup most are either people using multiple workstations regularly or find them selves often switching machines. You can read Mitchell Hashimoto’s (founder of hashicorp) old notes regarding his Nix setup. This is what got me interested in the first llace
@mischavandenburg
@mischavandenburg 2 ай бұрын
@@devopstoolbox I agree, in this kind of situation it is definitely an advantage. I'm still trying to think of situation where one switches mac devices often though ^^ Do you know any?
@devopstoolbox
@devopstoolbox 2 ай бұрын
@@mischavandenburg TBH, yep, I use 2 - personal + work one, and I like my tools and configurations to stay the same. The use case where Mitchell used it he runs a linux and a virtual box inside with a reconfigured machine that he keeps moving around
@mischavandenburg
@mischavandenburg 2 ай бұрын
@@devopstoolbox I hadn’t thought of synchronizing across devices. Indeed I can see how having everything in code can be useful to change something on one Mac and then pull those changes to another later. I basically do the same but I have it compatible for all operating systems by using dev containers + devpod. Thank you for the reply! 💡
@linkarzu
@linkarzu 4 ай бұрын
Wonderful video, I really appreciate it. I've been considering learning Nix, but I know that will mean months of time invested, and knowing myself, I won't be able to stop, but I'll keep it in mind. As of now, I setup my mac with a bash scripts that: - installs brew - downloads and gives me access to my github repos (one of them being my dotfiles) - Installs my brew packages (that gets from my dots) - Configures tmux - Configure the macos defaults settings - Configure karabiner - etc As always, great videos, thank you!
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@linkarzu I get your point. But it doesn’t have to be months. Surly not if you’re just using Darwin! But yeah, it’s hard to get out 😅
@linkarzu
@linkarzu 4 ай бұрын
@@devopstoolbox good to know, thank you. neovim owns my time right now, cannot cheat on it with Nix, but I will give it a try some day.
@stefanbuchberger2581
@stefanbuchberger2581 4 ай бұрын
What keyboard stand, switches, keycaps and cables do you use for your moonlander?
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@stefanbuchberger2581 ZSA platform for tenting, switches are the Gateron yellow, the keycaps are the ones shipped with the keyboard (blank version of course)
@guilhermeprokisch
@guilhermeprokisch 3 ай бұрын
How did you make the browser transparent?
@dakshgulecha
@dakshgulecha 18 күн бұрын
How is the background on your github transparent?
@1234minecraft5678
@1234minecraft5678 Ай бұрын
What is the benefit of using homebrew instead of nixpkgs to install your packages? Do you use it this way, because you already set it up this way?
@devopstoolbox
@devopstoolbox Ай бұрын
No benefit. the other way around. in some rare cases that's the only way to get something, in other cases, just muscle memory / copying from the docs
@arunoruto
@arunoruto 4 ай бұрын
I like the idea that nix is getting more popularity, and I really appreciate ppl making videos abt it! Maybe I am wrong, but somehow the video felt a bit "rushed"... I have been using NixOS for the past year and you were jumping through the config a lot, without taking some time to explain it a bit. It was a bit overwhelming, so maybe potential Nix users could get scared off. I am also more used to vimjoyers concept of nix videos, where he tackes things step by step, explaining things.. and not config - desktop - then config back, but different line, desktop, and so on.
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@arunoruto point taken, thank you!
@floriantthebault521
@floriantthebault521 23 күн бұрын
Yeah, I definitely agree with you... doing a deeper dive on the config files would be a must !!!
@gnrsn9714
@gnrsn9714 4 ай бұрын
@devopstoolbox What are your thoughts on home manager? Currently dipping my toes into nix. Does it replace gnu-stow for .config linking or do they work in symbiosis?
@MatthewMorrissey
@MatthewMorrissey 4 ай бұрын
How do you get nix to follow the symlinks? I get hung up on either an error that the path doesn't exist or that the flake isn't a flake. Am I missing something?
@yetso
@yetso 2 ай бұрын
I fixed this by committing the file
@mjcramer
@mjcramer 2 ай бұрын
Should I replace homebrew with nix packages or am I going too far in the rabbit hole?
@devopstoolbox
@devopstoolbox 2 ай бұрын
Well...... let me put it this way: if you like rabbit holes, Nix is one you'll never come out of 😅 In all honesty - I just like the speed, elegance and robustness of nix.
@bikramtuladhar
@bikramtuladhar 4 ай бұрын
which terminal did you used in video? it is very nice
@zestynotions
@zestynotions 4 ай бұрын
Love your videos btw definitely worth a subscribe !
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@zestynotions thank you!!🙏🏽
@mihaelbos
@mihaelbos 3 ай бұрын
hi mate. just found your awesome channel today. Do your nix config files include all the packages and tools you use on your macbook? Would love to have that running on my mac too. 💪
@devopstoolbox
@devopstoolbox 3 ай бұрын
@@mihaelbos thanks man! It doesn’t include everything yet but I’m slowly moving towards nix
@zestynotions
@zestynotions 4 ай бұрын
hmm if you use nix apps why depend on homebrew in your setup? is something missing from homebrew ?
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@zestynotions 1. People have hard time letting go of their old ways 2. Sometimes brews aren’t published to nix…
@this_minizilla
@this_minizilla 4 ай бұрын
Also spotlight search can't search apps installed by nix.
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@this_minizilla good point
@Redyf
@Redyf 4 ай бұрын
Nix mentioned lets go
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@Redyf 😉
@rajkumarmano
@rajkumarmano 4 ай бұрын
really useful.
@bulldoser2610
@bulldoser2610 4 ай бұрын
What is the 5 percent remaining?
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@bulldoser2610 Finally someone asks! If we want to be accurate - a server can be 100% automated through its provisioning, initial deployment, installations, runtime till the end of its life. A Mac can’t, you have to have a human interacting with it at least for the the very start including getting nix and home manager installed. Hence the missing 5%
@whette_fahrtz
@whette_fahrtz 3 ай бұрын
literally all of this has been configurable in an automated way since the first version of Mac OS X. What advantage does all this complexity bring me vs just doing this all in a shell script running commands to change a few .plist keys and using installomator to install third party software?
@devopstoolbox
@devopstoolbox 3 ай бұрын
@@whette_fahrtz mainly the recoverability of your configuration. As someone who tweaks it fairly often and only pushing git changes when I’m ready, the in-between is always in danger. This fixes the problem for me.
@lapso9814
@lapso9814 2 ай бұрын
What keyboard is this one ? :+eyes
@devopstoolbox
@devopstoolbox 2 ай бұрын
Moonlander! Video coming soon :)
@tonyc_618
@tonyc_618 4 ай бұрын
I use ansible to install all my apps and configuration with one command, in linux and macOS, but this adds the posibility to control the macOS settings via code... interesting, thanks for the video!
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@tonyc_618 ansible is a cool way of doing local config! I’m assuming it takes more work though compared to a system like home manager
@c_kemper
@c_kemper 4 ай бұрын
@@tonyc_618 I ditched my entire ansible setup after realising what I can do with nix… and I spent a lot of time fine tuning my ansible setup, so it had to be worth it.
@lambada1975
@lambada1975 19 күн бұрын
Can you play games with Nix on a Mac?
@devopstoolbox
@devopstoolbox 18 күн бұрын
don't know 🤷
@comosaycomosah
@comosaycomosah 4 ай бұрын
dang this is really cool!
@RaffaelN
@RaffaelN 3 ай бұрын
Thank you so much for this awesome tutorial. May I ask what’s the Terminal name you are using? And what shell are you using Bash or Zsh? I’m assuming it’s Zsh (Oh my Zsh). Please correct me if I’m wrong. I appreciate the effort you put into your videos. Like and subscribe!
@devopstoolbox
@devopstoolbox 3 ай бұрын
@@RaffaelN thank you! I’m running zsh on wezterm and using starship as my prompt. There’s a recent video I made covering the entire setup if you like ;)
@binh1298ify
@binh1298ify 4 ай бұрын
To be honest, I was hoping that you would sip through all the options and find the most useful ones to put in the video because i'm a nix-darwin user already. But it's a good video regardless. Thanks man
@devopstoolbox
@devopstoolbox 4 ай бұрын
I wanted to make something for beginners. But you make a good point, maybe I'll make another one exploring the best bits
@vabatta
@vabatta 3 ай бұрын
why not using nix for everything rather than wrapping homebrew into it?
@devopstoolbox
@devopstoolbox 3 ай бұрын
Two main reasons - 1. not everything is baked as a nix package, and devtools often bother with homebrew only.. 2. convenience - it's easier to port and already existing list of brews
@sphyrnidae6749
@sphyrnidae6749 4 ай бұрын
Someone experience with Sequoia and Nix?
@codeitlikemiley
@codeitlikemiley 10 күн бұрын
can this be used on mac m1 ? or other silicon based mac?
@LiterateGoblin
@LiterateGoblin 4 ай бұрын
nix gang rise up
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@LiterateGoblin 😅
@dmitrykaa46
@dmitrykaa46 4 ай бұрын
Nice! Is it also possible to install some cracked software this way as well? 😂
@devopstoolbox
@devopstoolbox 4 ай бұрын
That's for you to find out 😆
@Danielo515
@Danielo515 4 ай бұрын
Until the ridiculous and stupid executives at Mac headquarters decide that the required API are no longer supported
@sharukhrahman7925
@sharukhrahman7925 4 ай бұрын
Hard disk dies before your config dies.. - apple
@jerikoo
@jerikoo Ай бұрын
you spend your life for changing one default parameter in Chrome, or VLC, or Cursor.. MUCH more that what you would use by installing a new laptop from scratch and getting rid of old trash that you don't use anymore on your old laptop... and maybe even some of the things/configurations, fail, due to changes in the packages that NIX config has not upgraded.. NIX is great for IaC, when you deploy 1K servers/containers whatever in a year, and you want a standard baseline. But for a personal laptop, it makes absolutely nonsense. imho
@devopstoolbox
@devopstoolbox Ай бұрын
Legit. Although most of my IaC is built with terraform, sometimes vendor-code, and rarely ansible, I've never tried Nix for that. The only places I do hear about it is actually people using it for localhost. That said, you have a point, Nix isn't as solid as I'd wish, but it's the best i found for what I'm doing and the way I configure my things.
@siuksliukaralius7029
@siuksliukaralius7029 16 күн бұрын
High tech solution for a low tech problem.
@adjbutler
@adjbutler 3 ай бұрын
NixOS!!!! lets go!
@RazoBeckett.
@RazoBeckett. 4 ай бұрын
Nix deez what ?
@Jalan-Api
@Jalan-Api 4 ай бұрын
I am the 1000th viewer
@c_kemper
@c_kemper 4 ай бұрын
Its been a year and a half now since I've gone down the rabbit hole... never came back out I'm in the position now where my macbook can go up in smoke and I'll be able to setup a new one in less than an hour... the nix bit only takes 15 minutes... you can guess what the rest of the time is spent on...
@devopstoolbox
@devopstoolbox 4 ай бұрын
@@c_kemper 😅
Is Nix Your New Terminal SUPERPOWER?
15:21
DevOps Toolbox
Рет қаралды 31 М.
Why I'm Ditching Nix Home Manager - And What I'm Using Instead
8:07
DevOps Toolbox
Рет қаралды 22 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Definitive Guide to Buying a Mac mini (and NOT wasting money)
17:56
Pete Matheson
Рет қаралды 163 М.
Nix and NeoVim
13:38
ThePrimeTime
Рет қаралды 160 М.
FDTD Simulations with Meep
1:31:52
Computational Nanophotonics Videos
Рет қаралды 820
I ranked EVERY terminal emulator. It was nuts
20:35
typecraft
Рет қаралды 154 М.
Home Servers Have NEVER Been This Easy: CasaOS + ZimaBoard
49:58
Hardware Haven
Рет қаралды 725 М.
Ghostty is Probably The Best Terminal Emulator I've Ever Used
12:26
DevOps Toolbox
Рет қаралды 73 М.
Getting Started with Nix
25:49
OpenTechLab
Рет қаралды 76 М.
How I Use Wezterm & Zsh For An Amazing Terminal Setup On My Mac
16:00
Josean Martinez
Рет қаралды 111 М.
I Used NixOS For 9 Months - Long Term Review
35:54
The Linux Cast
Рет қаралды 65 М.
The Perfect Neovim Note Takers Setup
11:24
DevOps Toolbox
Рет қаралды 34 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН