Nix flakes explained

  Рет қаралды 87,193

Vimjoyer

Vimjoyer

Күн бұрын

Пікірлер: 102
@Becoming-Human
@Becoming-Human Жыл бұрын
If my arithmetic is correct, you said nix twenty-seven (27) times. You said flake twenty-four (24) times, although technically thirteen (13) of the twenty-four (24) times was in the plural form as flakes. Nix, flakes, and cookies... yummy. :-) Keep up the excellent work with Nix and NixOS, as some of us are learning along with your videos and they help a lot. Thank you.
@vimjoyer
@vimjoyer Жыл бұрын
Holy cow! I'm going to have to count tomorrow morning, because It's late where I live, and also I've improvised in some parts of the video. 🍪
@Becoming-Human
@Becoming-Human Жыл бұрын
Also, if you have run out of cookies to send me, no problem. As a cookie substitution, I would really appreciate trying to understand how I could get dGPU passthrough to a VM figured out on a laptop, which has an AMD iGPU, and an AMD dGPU. I would like to be able to use NixOS for the base operating system, which would use the AMD iGPU, and then passthrough the AMD dGPU to a Windows VM so that the kids can use the laptop for school, Roblox programming, and gaming. Let me know if you think that this would make a great video, and if not, no worries. Thank you.
@vimjoyer
@vimjoyer Жыл бұрын
​@@Becoming-HumanI've actually managed to setup GPU pass through on NixOS on my Lenovo legion 5 amd + nvidia dgpu about 3 months ago. It was kind of easy on NixOS, because I didn't worry about blacklisting something important. Maybe I'll do a video about it later.
@affieuk
@affieuk Жыл бұрын
@@vimjoyer Yes please to this, although I have intel igpu and nvidia dgpu (optimus). I've installed kvm and also quickemu, but haven't had time to troubleshoot why quickget seems to be downloading the windows iso, but then I don't find it in my home directory... Yes I know I can get it manually.
@stefanml90
@stefanml90 Жыл бұрын
🤣🤣🤣🤣
@dasdadasdasd4917
@dasdadasdasd4917 Жыл бұрын
Just last night I was complaining to my friend how I couldn't find a simple explanation how to use flakes, and you posted a video a few hours later. Thank you!
@vimjoyer
@vimjoyer Жыл бұрын
I'm making these videos because I'm also frustrated by the lack of documentation.
@auntiecarol
@auntiecarol 11 ай бұрын
This comment for the YT engagement algorithm: my Emacs bros would be mad at me watching content from someone called Vimjoyer, but I don't care. After having just gone though a painful Debian reinstall, I wondered if there was a better way. Nix might be it. Or it might be Guix (who knows?). For the time being, I am grateful for these videos. You have a new subscriber!
@Anonymous4045
@Anonymous4045 9 ай бұрын
Did you end up going with nixos?
@auntiecarol
@auntiecarol 9 ай бұрын
@@Anonymous4045Yeah, there are many more examples to work from in comparison to Guix, and the community is larger.
@BartekBroniszewski
@BartekBroniszewski Жыл бұрын
That is the most useful flakes introduction I have ever seen, good job mate
@jeffrey1298
@jeffrey1298 Жыл бұрын
Easily, hands down.
@awakeningnow5376
@awakeningnow5376 4 ай бұрын
Your video should be part of a "must watch" list for NixOS beginner tutorials. Thank you for your effort!
@raunakchhatwal5350
@raunakchhatwal5350 Жыл бұрын
I had just recently decided that since my Nixos was already working, it probably wasn’t worth it to figure out the motivation behind nix flakes (which I really couldn’t grasp until I watched this video). Thanks, this really explained it.
@brianlogan4740
@brianlogan4740 5 ай бұрын
Honestly probably the simplest most matter of fact intro to Flakes I've pulled up so far. Thank you for this!
@7h3mon
@7h3mon Жыл бұрын
Your microphone is not terrible! You sound clear AF!
@MiaLovesRod
@MiaLovesRod Жыл бұрын
your channel is gold, i understand about flakes and nixOS more deeply, i hope that you can more videos talking NixOS and its environment.
@marcuswest8085
@marcuswest8085 Жыл бұрын
I really appreciate your work VJ. The presentation is excellent - visually clear and painstaking. Seems like I'm not the only person who appreciates this.
@TheRationalLifter
@TheRationalLifter Жыл бұрын
Clearest explanation/example of nix flakes I've seen so far. Thanks, really useful!
@mumk
@mumk 8 ай бұрын
Thanks, I've always thought that Nix is some witchcraft that is difficult for plebeians to practice, but turns out that it was a huge fallacy. Nix is so simple. Wouldn't have cleared out my doubt without you, many thanks for this splendid video, cheers.
@A-zn3wh
@A-zn3wh 7 ай бұрын
Very well explained. Your initial comment about being on the 3rd page of still holds true nearly a year later.
@WaterGame7777
@WaterGame7777 6 ай бұрын
God bless! I'm trying to learn NixOS so I can install it on my system, and flakes were by far the hardest concept for me to learn, but this made it simple to understand. Thank you so much!
@pmmeurcatpics
@pmmeurcatpics 10 ай бұрын
I see that the playlist already has a lot of videos, but im still going to comment to make KZbin recommend this playlist to other users just it did to me:)
@gungun974
@gungun974 Жыл бұрын
I finally started to understand what’s Flake are with your video. Now it’s time for some practice ❤
@vimjoyer
@vimjoyer Жыл бұрын
Practice makes perfect
@ashimregme
@ashimregme 5 ай бұрын
Such a simple and to-the-point explanation! TYSM.
@gbember3470
@gbember3470 Жыл бұрын
Thank you for the video! I hope your channel gets more known
@vimjoyer
@vimjoyer Жыл бұрын
Thanks for kind words!
@CTWilliams89
@CTWilliams89 Жыл бұрын
Loving the content, subbed and looking forward to more as I just discovered nix!
@benarcher372
@benarcher372 9 ай бұрын
Finally, a good nix flake description! Thx
@ChrisMcDonough
@ChrisMcDonough Жыл бұрын
Great series so far! You have a knack for explaining this stuff.
@mr2octavio
@mr2octavio Жыл бұрын
Thank you for the video! Consider uploading it to the wiki or docs
@vimjoyer
@vimjoyer Жыл бұрын
I'm not satisfied with the quality enough for wiki or docs 😅
@sabergo1
@sabergo1 Жыл бұрын
@@vimjoyer I'd say its better than what exists now. Thanks for the tutorial.
@mr2octavio
@mr2octavio Жыл бұрын
​@@sabergo1I agree, better fall forward
@luckyspiff
@luckyspiff Жыл бұрын
Good work, thank you! Please continue this series!
@RegularTetragon
@RegularTetragon Ай бұрын
Nix flakes are the monad of packaging formats
@CarlosVixil
@CarlosVixil Жыл бұрын
Fine! I'll subscribe. I think adding "- what are nix flakes?" to the title or description might help with SEO. Which Nix seems to be avoiding.
@user-db4dd4ze3n
@user-db4dd4ze3n Жыл бұрын
The best explanation of flakes I have seem
@vimjoyer
@vimjoyer Жыл бұрын
Glad you liked it!
@AminD0
@AminD0 Жыл бұрын
Dude! Very nicely explained. Thanks
@brainstormsurge154
@brainstormsurge154 7 ай бұрын
Really loved the bob example just to show how to do it with any variable. Although I'm curious if you could do "bob.default" so you don't have to use the "#" in the command or would it need to be the whole "devshells.bob.default". What if it was just "devShells.bob"? Just curious since I'm just learning this.
@vimjoyer
@vimjoyer 7 ай бұрын
Yeah, the convention is to have something.default, so it would be devshells.default
@The8BitHero
@The8BitHero 6 ай бұрын
This helped understand it a bit more. I would love if you can show how to add the ability to install "unfree" packages using home manager and flakes. I've been searching and just can't figure it out.
@natural-selection-69
@natural-selection-69 Жыл бұрын
KEEP THEM COMING! I'd appreciate it if you made a video explaining nix profile, home-manager and how wrapping configuration.nix in nix flake eliminates the need of updating nix-channel
@jdecicco91
@jdecicco91 Жыл бұрын
Yes please, +1 for this^
@AngriestEwok
@AngriestEwok 4 ай бұрын
Thanks, very interesting. Something I'm confused about is what do you do if you want to upgrade to the latest stable version of a package or even update the lot? I get the idea of fixing versions but after a while we need to update as versions are no longer supported with bug and security fixes.
@vimjoyer
@vimjoyer 4 ай бұрын
Check the latest flakes video on the channel, it will answer your questions
@UnabashedOops
@UnabashedOops 10 ай бұрын
My major concern with flakes is that in today’s age keeping your system up to date with security fixes is paramount. I would want to run updates on all my flakes weekly in an automated fashion. I wish the cli had an easy option for that.
@vimjoyer
@vimjoyer 10 ай бұрын
I think `system.autoUgrade` can work with flakes. Relevant discourse thread - discourse.nixos.org/t/best-practices-for-auto-upgrades-of-flake-enabled-nixos-systems/31255
@UnabashedOops
@UnabashedOops 10 ай бұрын
Thank you!
@jaydelux2086
@jaydelux2086 Жыл бұрын
this was a very good explanation thank you
@rijandhakal9228
@rijandhakal9228 8 ай бұрын
Could you do a video on making a proper FHS file-system inside of nix? Something that can help bridge the gap when the packages of another ecosystem are not fully supported on Nix, it seems like a FHS system is necessary.
@vimjoyer
@vimjoyer 8 ай бұрын
You can use buildFHSEnv (I'll make a video about it sooner or later)
@witalbum
@witalbum Жыл бұрын
Very good video! What fonts you use at 0:40 and 1:25 to show the command?
@vimjoyer
@vimjoyer Жыл бұрын
Jetbrains mono
@alexandersafiullin9820
@alexandersafiullin9820 Жыл бұрын
02:57 We can see that no nixpkgs input specified for the flake. But it somehow got used later in the outputs. Also flake.lock got those nixpkgs pinned to some revision. Tell me, guru, what revision is gonna be used in this case?
@vimjoyer
@vimjoyer Жыл бұрын
If inputs field is not specified, nix just assumes you want a single nixpkgs input. IIRC it uses "github:nixos/nixpkgs/nixpkgs-unstable" by default.
@martinRandomName
@martinRandomName 3 ай бұрын
I guess the exporting a default package is a newer feature?
@adhominems
@adhominems 16 күн бұрын
Thanks for this video this was very helpful!
@luigitech3169
@luigitech3169 Жыл бұрын
Thanks for the video, what i don't understand is (coming from Docker) where to store or mount persistent data. I'd like to mount an "host" directory where to keep important data outside the flake, is possible to do it? I mean the equivalent of docker volumes
@vimjoyer
@vimjoyer Жыл бұрын
These development environments are not actually containers, they just modify some environment variables such as $PATH and $LD_LIBRARY_PATH to achieve what you see. They don't have their own storage, and you can access all your data. Flakes are just a way to declare those environments. That being said, you can build your docker images with nix: nixos.wiki/wiki/Docker You could use flakes to declare those as well.
@luigitech3169
@luigitech3169 Жыл бұрын
@@vimjoyer thanks now i understand
@zukxxxx0
@zukxxxx0 5 ай бұрын
Is it possible for making videos to guide set up nix package manager in macos, setting up nix flakes, home manager and the nix profile. I am tired of reading blogs and 50/50 successful at setting up the above mentioned
@rochecompaan
@rochecompaan 7 ай бұрын
Thanks for a great intro to flakes! I'm not following what you mean with "if you named your dev shell bob ... you will have to use bob as key when running nix develop". What is a dev shell and how do you name it?
@zacharyquinn3676
@zacharyquinn3676 Жыл бұрын
Keep the nix videos coming!
@bepobepobepo
@bepobepobepo Жыл бұрын
Please keep making nix videos!
@florianthesnow
@florianthesnow Жыл бұрын
By far the best explanation of flakes out there! And I have been looking for a long time!
@wyfyj
@wyfyj Жыл бұрын
Thank you so much for the video
@astronomer404
@astronomer404 6 ай бұрын
Great content, keep it up.
@abbcc555
@abbcc555 5 ай бұрын
So after this the vim command is still not available, what's the point.
@Sankaritarina89
@Sankaritarina89 Жыл бұрын
why one repo per flake? can i not have one repo for all flakes or is that a bad thing? (i have not yet started using nixos, I will first watch all your videos :)
@vimjoyer
@vimjoyer Жыл бұрын
I mean one flake for one separate project, you probably don't want your python project update break your rust development environment. Having 1 flake for both home-manager and NixOS on the other hand is a good idea.
@Sankaritarina89
@Sankaritarina89 Жыл бұрын
@@vimjoyerok I understand! that makes sense
@johanvandermerwe7687
@johanvandermerwe7687 Жыл бұрын
This was excellent!!
@wyfyj
@wyfyj Жыл бұрын
Thank you for the video
@schendelenterprises2955
@schendelenterprises2955 Жыл бұрын
I want a cookie too ;-)
@Eddio0141
@Eddio0141 Жыл бұрын
funny i start looking into nixos and this video just got uploaded recently
@gustavojoaquin_arch
@gustavojoaquin_arch 2 ай бұрын
based, i will switch to nix from arch btw
@deltamico
@deltamico 9 күн бұрын
you can use nix on arch no?
@gustavojoaquin_arch
@gustavojoaquin_arch 9 күн бұрын
@deltamico yes but it's more limited, having only nixos installed is better, but the libertarian communist are ruining nixos, Arch is better
@diagram_sock
@diagram_sock Жыл бұрын
I'm about to hop on Nix
@vimjoyer
@vimjoyer Жыл бұрын
Epic
@fire17102
@fire17102 Жыл бұрын
Thanks for the inspiration, just started on a new clean refurbished laptop and installed nixos on wsl. Trying to get ohmyzsh to work declaratively with plugins. Trying to get home manager to work... What a rabbit hole.. hope to make it to the other side with and get reproducible pretty zsh env. Anyone has a flake for that?? Thanks and all the best
@looptime9525
@looptime9525 Жыл бұрын
Don't you call --zsh flag when running the command?
@pablo_alonso_ramos_henao3341
@pablo_alonso_ramos_henao3341 Жыл бұрын
Thx dude.
@hobbyfor
@hobbyfor Жыл бұрын
sorry, i didn't get know what the power in flake ,and i was try to put My H-M in it ,it is not working ,btw nice video
@МішаняБ
@МішаняБ Жыл бұрын
🎉
@TimmyJose-n4t
@TimmyJose-n4t 8 ай бұрын
Why is the volume so low?
@biker1500
@biker1500 Жыл бұрын
the video is pretty confusing and very hard to watch, this video is not zoomer friendly
@vimjoyer
@vimjoyer Жыл бұрын
sorry
@lennyescott
@lennyescott Жыл бұрын
maybe you shouldn't use nix?!
@biker1500
@biker1500 Жыл бұрын
@@lennyescott why
Best Way To Manage Project Dependencies | Nix Shells
10:45
Vimjoyer
Рет қаралды 18 М.
Интересно, какой он был в молодости
01:00
БЕЗУМНЫЙ СПОРТ
Рет қаралды 3,9 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 40 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 21 МЛН
Ultimate NixOS Guide | Flakes | Home-manager
15:30
Vimjoyer
Рет қаралды 192 М.
NixOS Has One BIG Problem
17:48
The Linux Cast
Рет қаралды 76 М.
NixOS Development Environment/Shells for Programming
8:41
Ultimate Nix Flakes Guide
17:08
Vimjoyer
Рет қаралды 34 М.
Nix and NeoVim
13:38
ThePrimeTime
Рет қаралды 159 М.
Nix for Everyone: Unleash Devbox for Simplified Development
20:16
DevOps Toolkit
Рет қаралды 18 М.
Matthew Croughan - Use flake.nix, not Dockerfile - MCH2022
17:25
Matthew Croughan
Рет қаралды 51 М.
Nix Darwin Turned My Mac into a Fully Automated Machine
9:48
DevOps Toolbox
Рет қаралды 49 М.
Modularize NixOS and Home Manager | Great Practices
8:07
Vimjoyer
Рет қаралды 33 М.
I was WRONG! This is the BEST Package Manager.
10:25
Chris Titus Tech
Рет қаралды 145 М.
Интересно, какой он был в молодости
01:00
БЕЗУМНЫЙ СПОРТ
Рет қаралды 3,9 МЛН