Get another discount on top of Hostinger's great pricing using this link - hostinger.com/devopstoolbox Or, use `DEVOPSTOOLBOX` code when checking out! Join 2000+ subscribers getting one dev/sec/ops tip every Friday: signup.omerxx.com
Hmm the graph you used is heavily outdated. Not sure where you found it, but that graph is an old capture of repology (see their website for an up to date graph). Nixpkgs beingis larger than the AUR, but also way fresher too Official package.json manifest reports a total of 117345 packages
I transitioned from MacOS to NixOS a few months ago and I'm loving it. I use it for both private and professional use (as a developer). The combination of NixOS, flakes and home-manager is awesome. Yes there is a steep learning curve but to be able to declaratively manage your system outweighs the lenrning curve. Now I can have identical setup on my laptop and desktop pc and even a part of it on my MacBook. Since you can rollback from any update, i can use the unstable version without any fear of breaking my system 😅
@@jjmachan I don't use any of those ones on Mac 😅 I tried for a while Arc but it was buggy to me (maybe it improved since). They are few apps that I miss on Linux but none of the ones you mentioned: DEVONthink and Photos and I still use a Mac for those two. For the web, I really like Firefox (especially for web development). For launching apps, I have a custom app launcher in my tiling window manager (Hyprland). For the rest, I use the same apps on both Mac and Linux, especially Tmux, Neovim, docker, a bunch of terminal cli, yazi... I would say especially for development involving docker images, Linux is much faster. Using flakes for my projects means I can manage not only the package dependencies (such as python packages via poetry) but also the toolings themselves (python, poetry, make...) and have everything explicitly declared in the flakes. When i use any project on another Nix ready machine (not necessarily nixos), then I am ensured to get the same exact version of all the tools and packages used for any given project and when I exit the project folder, none of them exists anymore, which is great because there is no dependency conflict between projects or the system.
I went down the rabbit hole as well. But you should learn the nix language FIRST. It will demystify a lot of the config as a language style. It comes down to this: I want the same setup on every machine I work on. My job is to ship development environments to other devs as well, so this rabbit hole is worth it. I have seen companies using Nix for this reason as well.
NixOS seems like a rabbit hole, but Nix itself on top of another system looks really interesting. I think using it for servers looks to be something really valuable.
Yeah, yeah, nixos is a rabbit hole, we all know at this point, now please create a playlist for Nix stuff and upload more tutorials about flakes and configs for neovim, shell, etc, etc, etc, etc, etc, etc, etc. We need that stuff please!
Had heard about nix a few times before but never really knew it what it was and now that I know it i want to try and already trying to port my raw shell script files to nix. Thanks for the video :)
Great video. I was lost most of the time. Looks like the potential of Nix ecosystem is immense. But I quickly gave up after an hour of reading documentation, especially the crazy Nix language.
Man thanks for this video, I haven't gotten into Nix at all, but it looks awesome. I had to manually build some packages for a fresh ubuntu install the other day and this looks like it could've made it funner to do (I explicitly didn't mention saving time because it looks like I'm going to be spending a lot of it getting up to speeed, heh)
Well, NGL, all the flake things you've shown went right over my head. I'm guessing it's going to be the "legacy" way for me, seems more than enough for what I would use it for.
I love devbox with direnv, it's amazing to not polute my entire system with project related tools. Also the version managment is so easy. Only some flakes/packages do not compile on silicon.
1. Definitely getting there! 2. Maybe a n00b question - isn't part of the flakes idea is that you have the instructions to build it locally so that anything eventually can support every arch?
I would argue that Nix is a functional language rather than a DSL, but great vid, appreciate going back to the old style of vids, and looking forward to more nix content cheers!
Great question 😉 this is one the problems. Nobody knows, there’s tons of docs, there’s a lively subreddit, flakes dedicated platforms, but nothing central that I found… nix.dev and zero-to-nix.com/ are good options to start with
TRUE. I did my best here and I don't think it's remotely close to perfect. But since I couldn't find one place to get started that's not seriously debated, and I was SWAMPED in information, I wanted to start from the "guide I wish I had"
Graph you used is heavily outdated. See repology, where the graph was originated from. Nixpkgs have more packages than the AUR, and they are also way fresher. FThe official nix unstable channel package json, reports 117345 packages.
I just checked the graph. I assume that despite having CRAN (for R) and PyPi (for Python), npm was excluded cuz it's wayyyyy above everything else (2 mil and counting lmao)
@@opposite342 it is excluded because it don't provide any way to easily parse the packages list, with information required by repology (name, version, source, ...) Repology asks some base requirements to be properly listed, see issue 649 of repology-updater repo
I was hoping flakes would be a simple toggle in the installer by now. Ideally I'd, make the first thing the installer presents to the user an option to select a github repo so they can use or clone a systemConfig
Thank you! This is the ZSA Platform. Quite pricy, but I love it. You can find some 3D-printable ones on their website if you don't want to spend this much on a tenting kit
Nope. Still don't get it. Not even the package management! 🙂 I'm on macos. Don't I need to install 'something' before I can use terminal commands like 'nix-env'. Thanks for this introductory video! And will not packages installed by Nix clash with the previously packages installed by brew? So many questions.
Yep I had hard time getting it too 😅 But when I figured *anything* can become a flake, including my esoteric tmux plugin, and receive build instructions so it can literally run anywhere, I started digging
Combining it with direnv and you can automatically create and start/stop temporary shells with your required dependencies when you cd in/out of your project is pretty neat! Localised environments, configured as code in your repo, without the overhead of running Docker :D
I would say be careful don’t dive too deep into the nixos rabbit hole. Because you might end up trying to make everything “pure” but this really has no end to it
Tried setting up nixos. One giant issue with it is that i can’t use it without doing major changes to my configs. I feel like the documentation, is really scattered, and hard to find what i’m looking for
This is my own opinion, but I believe the true power of Nix flakes is only shown when used with NixOS. I'm new to Nix, after migrating from Arch, and I found the nix language quite hard, but after around 2 weeks, it became quite simple. I still don't understand most of what you've shown in the video, but modern nix flakes for NixOS systems has changed a lot over the years and has become quite simpler than nix over other distros.
Bare in mind I'm starting out like you, but I was looking for ways to use Nix for my personal projects and local use of non-linux machines. My intrigue started when users asked and contributed a flake configuration to my Tmux SessionX plugin (github.com/omerxx/tmux-sessionx). Ever since I'm down in the rabbit hole and it seems to only go deeper 😆
I was with you up until you started talking about flakes. It seemed like you started hopping around in and out of environments(nix-shells?) without much explanation as to what was happening, and that is the part I am trying to wrap my dense head around. I understand that a flake is a way to kinda provide 'everything for a project' but when a flake is created does it become part of the OS or do you have to 'jump into it' every time you want to use something that is in the flake? For instance, lets say I want to add a few programs or configurations into a flake so I don't mess with my base system. As far as I understand I have to 'go into' the flake to use them correct? what if I decide I want this config to live on my main system now do I 'merge' the flake it with my system or what am I missing?
ok. I installed nix on fedora and installed some hyprland stuff, waybar, and wofi. Currently installing a s**tload of dependencies that seems excessive, and its worrying me. Is this a normal thing when using using nix on a non-nixos distro?
Does this work? ua-cam.com/video/yCgieVu13VQ/v-deo.htmlsi=5zJPqTw_SnrXz-yX Or do you have something else in mind? I did think of making something "from scratch", I just wonder whether this answers the request or no...
Mostly true, especially for other apps, but like others mentioned, there's other selling points - extreme reproducibility, the one-off shell tools and that configurable environment. Brew is good with packages and especially wide range of GUIs, but it's something different...
@@RegrinderAlert What part of what I said is not the point? Is it that it brew has a magnitude more support? No, it can't be that because that is true. Is it that brew is simple to use because it does one thing and does it well? No, it can't be that because that is true. Blind loyalty can sometimes short circuit one's critical thinking.
Very good content. Though I feel many times that your videos are packed with too much information. You've packed here in 15 minutes enough stuff for an hour long video IMHO. You should consider breaking your videos down to courses - or maybe you're already doing it and I just don't know? 😅
In English, all the words that start with "giga-" start with a hard "g" sound. So, the first syllable is "gi" as in "give", not like "gin". It's not obvious to a non-native speaker.
I read this comment without watching. At first I was like why is he correcting the pronunciation, then i said what giga sounds like with gin pronunciation. Yeah good call and example.
Nix is a great idea with a horrible implementation. Sure, it can install a command line tool if you're lucky somebody maintains is. As soon as your setup becomes a little more advanced debugging anything becomes cumbersome. And if you're using Flakes you have to submit your hardware config with the repo --- so you can't have a single repo unless you submit the config from all the computers you want to use it with. Which kinda defies the whole purpose of having a config that you supposedly should be able to deploy in minutes anywhere. 🤣
This. There is no bridge between the simple hello world examples and a more complex real world use case. I just want a list of binary dependencies and for the environment to keep my node modules up to date on entry. Gotask can run conditional commands that watch package.json and package-lock.json and .tool-versions for ASDF to achieve this. Spent a week trying to do this with nix and dropped in favour of a solution that was working in about 3 hours using gotask and ASDF. I'd love to learn nix but I'm time poor and have shit to do.
i just wish i knew how to replace my dev environment from asdf to flakes, but i can't find a tutorial. i currently developing react native on Mac os and i need node, java and ruby. ASDF works great changing binaries from system to a specific version but nix seems to be good knowledge to have
I tried NixOS and actually it is a mess. You can see at packages and configuration, that maintainers and contributors dont have a common vision. If you already use a Linux distribution and you are happy with it: Just ignore Nix/NisOS for your own mental health. Especially If you want to keep your real Linux next to it: Dual Boot ist nothing NixOS likes
Get another discount on top of Hostinger's great pricing using this link - hostinger.com/devopstoolbox
Or, use `DEVOPSTOOLBOX` code when checking out!
Join 2000+ subscribers getting one dev/sec/ops tip every Friday: signup.omerxx.com
Hmm the graph you used is heavily outdated. Not sure where you found it, but that graph is an old capture of repology (see their website for an up to date graph).
Nixpkgs beingis larger than the AUR, but also way fresher too
Official package.json manifest reports a total of 117345 packages
Would love a full nix/nixOS series !
Let's start with Nix tooling, and slowly build up toward the OS :)
@@devopstoolbox I’ll take anything, very little nix content that hits this quality :D
@@Apollo1_ Thank you! ❤
I transitioned from MacOS to NixOS a few months ago and I'm loving it. I use it for both private and professional use (as a developer). The combination of NixOS, flakes and home-manager is awesome. Yes there is a steep learning curve but to be able to declaratively manage your system outweighs the lenrning curve. Now I can have identical setup on my laptop and desktop pc and even a part of it on my MacBook. Since you can rollback from any update, i can use the unstable version without any fear of breaking my system 😅
Sounds incredible! This is where I want to be.
how do u compare the use of macos only apps like Arc, Linear, Raycast that are not on nixOS (linux)
@@jjmachan I don't use any of those ones on Mac 😅 I tried for a while Arc but it was buggy to me (maybe it improved since). They are few apps that I miss on Linux but none of the ones you mentioned: DEVONthink and Photos and I still use a Mac for those two. For the web, I really like Firefox (especially for web development). For launching apps, I have a custom app launcher in my tiling window manager (Hyprland). For the rest, I use the same apps on both Mac and Linux, especially Tmux, Neovim, docker, a bunch of terminal cli, yazi... I would say especially for development involving docker images, Linux is much faster. Using flakes for my projects means I can manage not only the package dependencies (such as python packages via poetry) but also the toolings themselves (python, poetry, make...) and have everything explicitly declared in the flakes. When i use any project on another Nix ready machine (not necessarily nixos), then I am ensured to get the same exact version of all the tools and packages used for any given project and when I exit the project folder, none of them exists anymore, which is great because there is no dependency conflict between projects or the system.
@@jjmachana few of those apps are linux knock offs
@@jjmachannixOS isn't linux
I went down the rabbit hole as well. But you should learn the nix language FIRST. It will demystify a lot of the config as a language style. It comes down to this: I want the same setup on every machine I work on. My job is to ship development environments to other devs as well, so this rabbit hole is worth it. I have seen companies using Nix for this reason as well.
NixOS seems like a rabbit hole, but Nix itself on top of another system looks really interesting. I think using it for servers looks to be something really valuable.
Yeah, yeah, nixos is a rabbit hole, we all know at this point, now please create a playlist for Nix stuff and upload more tutorials about flakes and configs for neovim, shell, etc, etc, etc, etc, etc, etc, etc. We need that stuff please!
Had heard about nix a few times before but never really knew it what it was and now that I know it i want to try and already trying to port my raw shell script files to nix. Thanks for the video :)
Great video. I was lost most of the time. Looks like the potential of Nix ecosystem is immense. But I quickly gave up after an hour of reading documentation, especially the crazy Nix language.
Man thanks for this video, I haven't gotten into Nix at all, but it looks awesome. I had to manually build some packages for a fresh ubuntu install the other day and this looks like it could've made it funner to do (I explicitly didn't mention saving time because it looks like I'm going to be spending a lot of it getting up to speeed, heh)
Well, NGL, all the flake things you've shown went right over my head. I'm guessing it's going to be the "legacy" way for me, seems more than enough for what I would use it for.
@@driden1987 LMK how it goes.
I'm also a 1987 model btw 😆
Love NIX!!!!! Thanks for the video.
I love devbox with direnv, it's amazing to not polute my entire system with project related tools.
Also the version managment is so easy.
Only some flakes/packages do not compile on silicon.
1. Definitely getting there!
2. Maybe a n00b question - isn't part of the flakes idea is that you have the instructions to build it locally so that anything eventually can support every arch?
@@devopstoolbox 2. Should be, but seems like many flakes are not tested on aarch64, or some of their deps.
@@rwz makes sense
I love Nix but it is not mandatorily better than Brew or orher user-space package manageds on linux because fundamentally cannot use SELinux
I would argue that Nix is a functional language rather than a DSL, but great vid, appreciate going back to the old style of vids, and looking forward to more nix content cheers!
Awesome stuff. What are some good resources to learn more about Nix?
Great question 😉 this is one the problems. Nobody knows, there’s tons of docs, there’s a lively subreddit, flakes dedicated platforms, but nothing central that I found…
nix.dev and zero-to-nix.com/ are good options to start with
@@devopstoolbox thanks! I'm about to nuke my old laptop and give it a go
Initial overhead of a nixos system can be alot. But if you structure it well (easier said than done). It's rather cumbersome.
TRUE. I did my best here and I don't think it's remotely close to perfect. But since I couldn't find one place to get started that's not seriously debated, and I was SWAMPED in information, I wanted to start from the "guide I wish I had"
Top quality content, as always! Thank you!
Graph you used is heavily outdated. See repology, where the graph was originated from. Nixpkgs have more packages than the AUR, and they are also way fresher. FThe official nix unstable channel package json, reports 117345 packages.
Crazy! Just realized that. Thanks for the update, I'll try to add it on my next Nix vid!
Crazy? I used to be crazy, they locked me in a room, a rubber room full of rats.
@@Taddy_Mason 😂
I just checked the graph. I assume that despite having CRAN (for R) and PyPi (for Python), npm was excluded cuz it's wayyyyy above everything else (2 mil and counting lmao)
@@opposite342 it is excluded because it don't provide any way to easily parse the packages list, with information required by repology (name, version, source, ...)
Repology asks some base requirements to be properly listed, see issue 649 of repology-updater repo
I was hoping flakes would be a simple toggle in the installer by now.
Ideally I'd, make the first thing the installer presents to the user an option to select a github repo so they can use or clone a systemConfig
It’s still an “experimental” feature that half of the community is against 🤷♂️
YAY! I think this was a great intro to Nix. ❄
Thank you! 🙏
This was a great intro! I gotta ask, though, what is that stand you have for your Moonlander?
Thank you!
This is the ZSA Platform. Quite pricy, but I love it.
You can find some 3D-printable ones on their website if you don't want to spend this much on a tenting kit
Clicked the like and subscribe, with the bell icon, but my nix config still does not work. What did I do wrong?
Strange. Try liking all the videos on the channel that should definitely do it
@@devopstoolbox I did that already! I will try to dislike a then like them again. By the way, have you heard about devbox?
@@Danielo515 of course. On it 😉
Nope. Still don't get it. Not even the package management! 🙂 I'm on macos. Don't I need to install 'something' before I can use terminal commands like 'nix-env'. Thanks for this introductory video! And will not packages installed by Nix clash with the previously packages installed by brew? So many questions.
Yep I had hard time getting it too 😅
But when I figured *anything* can become a flake, including my esoteric tmux plugin, and receive build instructions so it can literally run anywhere, I started digging
Combining it with direnv and you can automatically create and start/stop temporary shells with your required dependencies when you cd in/out of your project is pretty neat! Localised environments, configured as code in your repo, without the overhead of running Docker :D
Whats the minimal browser thing he used? Or it just editing magic?
It’s actually Arc with a minimized sidebar, but if your after a minimal option try Min
I spent 2 hours today trying to build a package in nix and it never worked. Best 2 hours of my day, while also hating myself.
😅
I would say be careful don’t dive too deep into the nixos rabbit hole. Because you might end up trying to make everything “pure” but this really has no end to it
Great video, more on nix please!
🙏
Looking forwrad to your next video!
Tried setting up nixos. One giant issue with it is that i can’t use it without doing major changes to my configs.
I feel like the documentation, is really scattered, and hard to find what i’m looking for
This is my own opinion, but I believe the true power of Nix flakes is only shown when used with NixOS. I'm new to Nix, after migrating from Arch, and I found the nix language quite hard, but after around 2 weeks, it became quite simple. I still don't understand most of what you've shown in the video, but modern nix flakes for NixOS systems has changed a lot over the years and has become quite simpler than nix over other distros.
I've been using NixOS for a while but I've never seen the need to use flakes so far.
The single config is very much the selling point of Nix and NixOS for me. But having a flake for my firefox extensions in home manager is great.
Bare in mind I'm starting out like you, but I was looking for ways to use Nix for my personal projects and local use of non-linux machines. My intrigue started when users asked and contributed a flake configuration to my Tmux SessionX plugin (github.com/omerxx/tmux-sessionx). Ever since I'm down in the rabbit hole and it seems to only go deeper 😆
@@devopstoolbox remember, I warned you 🤣
I was with you up until you started talking about flakes. It seemed like you started hopping around in and out of environments(nix-shells?) without much explanation as to what was happening, and that is the part I am trying to wrap my dense head around. I understand that a flake is a way to kinda provide 'everything for a project' but when a flake is created does it become part of the OS or do you have to 'jump into it' every time you want to use something that is in the flake? For instance, lets say I want to add a few programs or configurations into a flake so I don't mess with my base system. As far as I understand I have to 'go into' the flake to use them correct? what if I decide I want this config to live on my main system now do I 'merge' the flake it with my system or what am I missing?
This was an excellent intro into NIX. I’m looking for a way to operate remotely and machine agnostic, this is the way.
Yep! Definitely exploring that idea and hopefully I'll be able to release the video at some point
ok. I installed nix on fedora and installed some hyprland stuff, waybar, and wofi. Currently installing a s**tload of dependencies that seems excessive, and its worrying me. Is this a normal thing when using using nix on a non-nixos distro?
Hi can you make a tutorial for beginners how to customize the terminal
Does this work? ua-cam.com/video/yCgieVu13VQ/v-deo.htmlsi=5zJPqTw_SnrXz-yX
Or do you have something else in mind?
I did think of making something "from scratch", I just wonder whether this answers the request or no...
@@devopstoolbox not. Help enough sir and thank you for your time
Brew is hugely more supported on the Mac than nix is and it's much simpler to use if all you want is a Mac OS compatible package manager.
That's not the point of Nix and despite being "less supported", nix is rock-solid and almost unbreakable compared to homebrew.
Apples and oranges…
Mostly true, especially for other apps, but like others mentioned, there's other selling points - extreme reproducibility, the one-off shell tools and that configurable environment.
Brew is good with packages and especially wide range of GUIs, but it's something different...
@@c_kemper I like fruit :)
@@RegrinderAlert What part of what I said is not the point? Is it that it brew has a magnitude more support? No, it can't be that because that is true. Is it that brew is simple to use because it does one thing and does it well? No, it can't be that because that is true. Blind loyalty can sometimes short circuit one's critical thinking.
Holy shit, This is awesome
I want to jump on NixOS but my Arch don't wanna screw up or give problem so no chance, and ya I use Arch, Btw.
😆
Why not both?
If I can use it macos, I'm sure there's a selling point for arch users...?
@@devopstoolbox authenticity...i guess
Very good content. Though I feel many times that your videos are packed with too much information. You've packed here in 15 minutes enough stuff for an hour long video IMHO. You should consider breaking your videos down to courses - or maybe you're already doing it and I just don't know? 😅
In English, all the words that start with "giga-" start with a hard "g" sound. So, the first syllable is "gi" as in "give", not like "gin". It's not obvious to a non-native speaker.
Thanks!
I read this comment without watching. At first I was like why is he correcting the pronunciation, then i said what giga sounds like with gin pronunciation. Yeah good call and example.
Nix is certainly one heck of a rabbit hole. Hard to get into if you're new, and even harder to get _out_ of if you're not.
NO DOUBT
0:26 thats just the stable tho...
unstable on the other hand...
true 😅
Nixos is not for newbies. Has very unique approaches to handling packages. Unlike other distros.
Very much so…
Nix is a great idea with a horrible implementation. Sure, it can install a command line tool if you're lucky somebody maintains is. As soon as your setup becomes a little more advanced debugging anything becomes cumbersome. And if you're using Flakes you have to submit your hardware config with the repo --- so you can't have a single repo unless you submit the config from all the computers you want to use it with. Which kinda defies the whole purpose of having a config that you supposedly should be able to deploy in minutes anywhere. 🤣
This. There is no bridge between the simple hello world examples and a more complex real world use case. I just want a list of binary dependencies and for the environment to keep my node modules up to date on entry. Gotask can run conditional commands that watch package.json and package-lock.json and .tool-versions for ASDF to achieve this. Spent a week trying to do this with nix and dropped in favour of a solution that was working in about 3 hours using gotask and ASDF. I'd love to learn nix but I'm time poor and have shit to do.
I TOLD YOU THE NIX VIDEO WAS COMING
😅
@@devopstoolboxThank you! Nix is awesome but tutorials like this are few and far between!
❄️
nix + hyprland
Nixos is better for containers than docker! ... Most of the time.
I definitely want to explore this idea. I’ve been working with containers for a decade. Can you recommend some content / references?
i just wish i knew how to replace my dev environment from asdf to flakes, but i can't find a tutorial. i currently developing react native on Mac os and i need node, java and ruby. ASDF works great changing binaries from system to a specific version but nix seems to be good knowledge to have
ASDF is fine. It's the tool of choice if you are time poor and actually need to get shit done.
largest package manager... isolated dependencies.. so nix is just npm for unixtuds?
NIX MENTIONED LETS GO
HAHA. The journey begins 😆
Nix, istant like
😅
You say Mac Oh-Ess (MacOS) and then you say NixOss (NixOS) in the same sentence. Is that just a way to get grammar nazis to comment on your videos?
well it worked it didnt it 😅
in all honesty, I just hear someone says something once and it sticks..
I tried NixOS and actually it is a mess. You can see at packages and configuration, that maintainers and contributors dont have a common vision. If you already use a Linux distribution and you are happy with it: Just ignore Nix/NisOS for your own mental health. Especially If you want to keep your real Linux next to it: Dual Boot ist nothing NixOS likes
arch is better btw
Can't think of a single advantage Arch has over nix other than requiring little knowledge to setup.
I WON'T BITE 😅
@@RegrinderAlertunlike nixOS, Arch has true documentation/wiki
nix not exist in ur dotefiles hhhh
Wasn’t pushed remotely yet… needs some cleaning up. It will be soon though 🤞