Next video in the series is available here: kzbin.info/www/bejne/f5rcc5iIYqyop9k It's about home manager, which is a Nix tool for managing dotfiles in your $HOME.
@travislodes53786 ай бұрын
I started with a vm, but when I made it, it doesn't have a hardware configuration file.. any ideas on how I make that happen?
@jordanagarrison Жыл бұрын
I’ve been using NixOS for two years and have been avoiding flakes. This was such a clear explanation. I don’t know why I was avoiding flakes anymore. Thanks for putting this out there. This is great!
@librephoenix Жыл бұрын
I'm glad this helped you!
@Flackon Жыл бұрын
For me, the fact they are still labeled as an experimental feature makes me think it’s not stable or mature enough yet
@CaseyHancocki3luefire11 ай бұрын
So true about the explanation of why to use flakes.
@PinkyZKey6 ай бұрын
The best explanation I've seen so far. Most other vids are good as well, but this is very well put together for people that don't have a lot of developer experience. Thank you so much. Also, may I ask the name of the fonts you use here? I have an unhealthy addiction to fonts. 😅 Right now I'm using Maple Mono (though I switch back and forth between that and Monaspace) for development and Recursive Sans Linear for writing my book.
@mrocholl3 ай бұрын
How did you manage without. I’ve been using it for three days and everything I want is a flake. Seems like this is the only way to get stuff done haha
@Louis-AlexandreDuchesneau9 ай бұрын
At 21:40, you should run "nix flake lock", this will create the flake.lock with user permissions. You may then run "nixos-rebuild switch --flake ."
@TonyBoston5 ай бұрын
but /nix/store is owned by root and I get a permission denied then
@cecilkorik4 ай бұрын
@@TonyBoston you still have to use sudo nixos-rebuild to update the whole system's /nix/store, but later on when you're also managing your home directory it will be convenient to have your lockfile set up with the correct permissions (created by your local user, not root). of course it's not that big a deal, you could also fix it with sudo chown.
@MarcLacoursiere10 ай бұрын
This is hands down the best flakes explanation I have ever seen!
@eygs4936 ай бұрын
are you stupid
@soymadip7 ай бұрын
Across all the guidee I have come before lacked practical processes. But you are the first one to practically doing things. Thanks a lot for this
@fortnitemaps2018 ай бұрын
Thank you! Most videos I watched were very fast and it was quite hard to keep up with the person talking. You really nicely explained everything and cleaned up stuff in my mind about how everything works. Thank you! ❤️
@harryvendryes2 ай бұрын
Nice clear voice. A screen that I can read. Natural ability as a teacher. All add up to a perfect video. Thanks from the UK.
@KaptenkulАй бұрын
Hi! Been searching around for an intro to NixOS a while and this video was the one that got me further. Great work! Nice and pedagogical.
@arielmenezes8919 Жыл бұрын
Excellent video. Your videos are all very good, and with the improved audio quality it's even more enjoyable to watch than it was before.
@librephoenix Жыл бұрын
Thanks so much!
@seheyt9 ай бұрын
I especially appreciate the time taken to explain the different syntactical forms for some of the nix file items.
@wherehasthedaygone4 ай бұрын
I started at "Manage Your NixOS Config with Git", but you kept referencing other videos, so I'm now three videos deep! Loving the style and way of explanation. Very clear. Looking forward to getting back to the first video :)
@forestcat512 Жыл бұрын
What a good video, started out really new on nixos and your video helped me understanding what ive already created with the help of other tutorials but without understanding it. thx :)
@Kermit2k9 ай бұрын
Clear, concise and to the point. You made flakes finally click for me. Thank you!
@alojzyleszcz1137 Жыл бұрын
Hi there! Thanks for the content. Exactly something I need. I've been planning to switch to NixOS for quite a while, but the more I read about it, the more lost I feel about the configuration file. Looks like one day I'll need to simply give it a shot and don't care about the consequences. Anyway, I'm going to prepare some crisps for the next episodes of your series. Looking forward to this. Thanks once again.
@nikob3813 ай бұрын
By far the best explanation of flakes I've been able to find, thank you!
@lesliechiang1710Ай бұрын
Thanks! Very clear and concise! I am thinking why don't you do more to complete it. Like how to build with flake with minimum on configuration.nix. Nevermind, I think you are mentioning it in later vidoes... thanks! Cheers!
@RaminAssadollahi2 ай бұрын
one of the best introductions into flakes, thank you!
@x53LL33 Жыл бұрын
More Nix content please! Modularizing from scratch would be super useful.
@librephoenix Жыл бұрын
A NixOS video is next on my recording todo list! I'm hoping to get a home-manager video out this weekend, and then the next NixOS video will be all about modularity
@hammerheadcorvette411 ай бұрын
I kind of felt tis is like Dockerfile with Podman. Pretty cool either way.
@michaelharmon55029 ай бұрын
Thank you for the great explanation of how to set up a flake in Nix. As someone still very new to Nix, I’m still left wondering why. What do they do exactly? What value do you get in exchange for the added complexity? On another note (I’m an audio engineer), in future videos, please move closer to your microphone and maybe also add some sound absorption to your recording space.
@CaseyHancocki3luefire11 ай бұрын
WOW. This helped me understand why to use flakes. And made it clear that a good starting point is a vm since all the important stuff is just a few config files. All you need to do is figure out what you want and need for a usable system and then install on real hardware with those few config files.
@andrickposo71479 ай бұрын
Love the video! Great explanation, now I can finally use flakes without being confused.
@DerekMurawsky4 ай бұрын
Nix is such an interesting concept, but it's about as clear as mud and as approachable as a lava pool. Thanks for making it a little more approachable!
@supernerd69839 ай бұрын
In this video you casually mentioned passing through a directory from the host to the vm. I have been pulling my hair out for months trying to get this to work with KVMs on NixOS. Please do a tutorial on virtiofs or whatever you used to do it!
@FakeRejectSanity10 ай бұрын
Thank you so much for this tutorial flakes finally make since now!
@uchennaofoma46244 ай бұрын
Thanks for this, I now finally know the relationship between nix flakes and the regular nixos configuration
@christopherchalcraft113410 ай бұрын
I have been using flakes for two years now but this was still very useful. I love the style of refactor with explanation
@szaszm_3 ай бұрын
This madman is switching back and forth between vim and emacs xd
@57d6 ай бұрын
Relatively new to linux only having used Ubuntu and Arch in passing, and looking to switch full time from Windows. Mainly due to being frustrated with the development experience and unwanted features being pushed down my throat. Loving this video series as I plan to slowly build up a config and switch from vm to metal.
@researchandthinkprimarily9 ай бұрын
Thanks for making flakes simple loved the video.
@wyfyj11 ай бұрын
I am trying out nixos again. I had a pretty good running system on my Framework laptop. But then, the Fire Nation attacked and I couldn't figure out what was causing xorg/wayland to crash. I felt like I spent enough time on it and left Artix. I remember leaving NixOS like 6 months ago. I feel like I only spent enough time on it to get comfortable enough to explore flakes and home-manager. This video is very well done. Plus I also see you are an Emacs enjoyer. I am trying to make the move to Emacs over neovim.
@2008regis10 ай бұрын
Thanks, man. I've been struggling with flakes for a while now and this tutorial helped me a lot. Thanks a lot
@StefanoPompa Жыл бұрын
Great video, very clear. For me it would be published (together with the home-manager one) in the home page of nixos official website!
@richardminasian983 Жыл бұрын
Thank you, Very thorough and easy to follow. After watching several confusing and hard to follow other videos regarding this subject I was ready to give up on NixOs until i stumbled on your videos and gained new hope. Please make more.
@librephoenix Жыл бұрын
Glad it was helpful! Definitely more tutorials on their way, once I get around to making them :)
@m0r4ag7 ай бұрын
This is very very cool, i’ve been curious about NixOS but i’ve been feeling so comfortable with Arch that having something very different as Nix kinda scares me, but this video was very interesting and motivating
@RobFisherUK Жыл бұрын
Perfect timing. I'm about to do a NixOS install and have been figuring out flakes with nix develop for a while, but wasn't sure how to apply them to a whole NixOS install. This video has perfectly filled that gap in my knowledge. Thanks!
@librephoenix Жыл бұрын
Thanks! I'm glad you found it useful! :)
@Chris-jp6ll7 ай бұрын
Finally an easy-to-digest intro for beginning the flakes journey!
@mcnairymichael9 ай бұрын
Thank you so much. Demystified flakes for me!
@diego898 Жыл бұрын
This video did so much for me to actually //understand// what is going on inside a nix file
@ThatNateGuy7 ай бұрын
This might sound strange, but I'm glad you kept in the missing semicolon error and correction in the video. It's a reminder to the less savvy like myself.
@jakubsokoowski56038 ай бұрын
Very good presentation. Question: How did you visualize the structure of the flake in your Emacs like that?
@librephoenix8 ай бұрын
It's lsp-mode with nix. I think this is the relevant config: github.com/librephoenix/nixos-config/blob/main/user/app/doom-emacs/doom.org#lsp The function to call is (lsp-treemacs-symbols). Also, I think you need a nix language server installed; the only one I could get to work was nil: mynixos.com/nixpkgs/package/nil
@Sudoakado6 ай бұрын
Very very cool mate thanks! Nicely articulated!
@XxH0T5H0TxX Жыл бұрын
Amazing video, would suggest adding some sort of annotation on the fact that the nixosconfiguration needs to be the same as the hostname. Had to spend some time fixing it myself before getting to that part of the video :D
@nordmu4 ай бұрын
perfect video for beginners to nixos! thank you very much :)
@forzaracer10 ай бұрын
great explanation, thank you! please keep them coming!
@borisoid Жыл бұрын
Amazing! Your channel is the only good source of nix.. knowledge / understanding that I know
@librephoenix Жыл бұрын
Thanks! Glad you find the Nix content helpful!
@Illumynatii Жыл бұрын
Fantastic explanation. Keep em coming!
@Alexander_Sannikov6 ай бұрын
I really tried to understand flakes multiple times but failed. What's the intended work pipeline with flakes? Am I supposed to create them from scratch every time? Do I create literally one and that's it? Is there a way to generate them automatically?
@abdullamasud4278 Жыл бұрын
Thank you for this
@XmagicBeastX Жыл бұрын
Great video! Might want to put a link to your nix dot files in the links reference. A few ideas for some new videos: setting up doom emacs would be great (preferably not one that takes 71 seconds to start, as shown in your tutorial on flakes ;-) Perhaps another on setting up an nvim distro like lazyvim or astrovim, and a couple of more advanced videos going in-depth into creating one's own packages, as quite a few non-enterprise applications seem to be out-of-date (veracrypt), or plain missing nordvpn (I see a handful of people have been struggling to get this working for more than a year - so it's obviously not that trivial for people new to nixos!) Also really like the look of the channel, keep up the good work!
@librephoenix Жыл бұрын
Thanks so much! Definitely some great ideas! Yeah.. my Doom Emacs startup is quite bloated XD. I've actually never created a proper nvim setup so it would probably be really fun exploring how to set that up in nixos!
@MichaelWilliams-lr4mb Жыл бұрын
Excellent video! I've been using flakes the past few weeks but I hadn't switched my nixos configuration.nix over to flakes. I might do that when I find time this week. Keep up the good work!
@librephoenix Жыл бұрын
Thanks! :)
@Saaat9 Жыл бұрын
Thank you! You made flakes much more approachable for me.
@librephoenix Жыл бұрын
Glad you found it helpful! :)
@Lopolin_LP8 ай бұрын
I have read and heard often about flakes but this made me finally understand how to make sense of the flake file, thank you! However I have two questions: 1. Why do we put our flake and configuration files into our home directory? Is it not possible to put it into the /etc/nixos folder and make it work? 2. If we have the configs in our home directory, why wouldn't we rather import the hardware configurations file from the /etc/nixos? Then if I just copy the whole dotfiles folder to a different computer it wouldn't apply the hardware config from the old pc... right? and I'm sorry if this is not the way of managing things, I'm pretty new to this stuff in general.
@johnsmith89816 ай бұрын
at 20:00 why would I define lib within that block vs putting it in the outputs like {self, nixpkgs, lib, ... }
@ThibautLamadon Жыл бұрын
Fantastic video, straight to the point but also lots of content. Seems like a great place to start!
@kyp07174 ай бұрын
Great video!
@alexobzor9 ай бұрын
This helps a lot, thanks!
@summerWTFE10 ай бұрын
I had to write which config to use like so "sudo nixos-rebuild switch --flake .#nixos-tutorial" or else I would get an error.
@RightHandedFridge9 ай бұрын
Same with me, thanks for the solution
@DilettanteProjects6 ай бұрын
Thank you for saving my sanity, this had me running circles like "how did I mess this up? It's like 20 lines of code and I copied it exactly"
@DilettanteProjects6 ай бұрын
Addendum: Oh nice, he says it in the video like a couple seconds after. If I'm following along and I get this error, I'm not gonna keep watching the video, I'll pause and try to backtrack.
@summerWTFE6 ай бұрын
@@DilettanteProjects yeah. If I had kept watching it would have saved me 30 minutes of research. But I also normally immediately stop the video to see if I did something wrong.
@Felipe-5311 ай бұрын
awesome video! thank you so much!
@LarsOksendal11 ай бұрын
Good work! Keep it up! 🎉
@csrlgr61767 ай бұрын
Super helpful, Thank you!.
@foxcirc11 ай бұрын
this was really useful and well explained ❤
@Xaito Жыл бұрын
I kinda expected the lock file to have the exact version of every single package, then I'd get the advantage - because I then could pin a troublesome package to a previous version while updating the rest of the packages to the newest version in the channel. But that doesn't seem to be the case here. Is there any advantage to working with a flake if you don't have the use case of synchronizing more than 1 PC to the same revision of the channel? I mean if I were to revert to a previous generation, wouldn't that have the same effect as rebuilding with a older state of the lock file? i.e. you switch back to a non-head state of the channel?
@luv2stack7 ай бұрын
Very good video. Liked!
@chrisrobbo9 ай бұрын
Really great content, fantastic teacher!
@kasergus24467 ай бұрын
Thank you very much for your guides! Btw, which browser are you using? It seems funny and vim like.
@sachinchaudhary13108 ай бұрын
best video for flakes i every seen
@kitastro Жыл бұрын
I like this guide cause you explain the basics and the advanced in order :)
@librephoenix Жыл бұрын
Thanks! I'm glad you found it useful!
@heroslippy66668 ай бұрын
This was a wonderful explanation! Do you have any videos on dev shells?
@librephoenix8 ай бұрын
I actually haven't made a video on that yet, but that's an excellent idea, I'll add it to my video todo board :)
@jujay519 ай бұрын
I’m enjoying your videos! May I know what is that file explorer you are using in your vim? Thanks in advance!
@librephoenix9 ай бұрын
Do you mean my emacs? I'm pretty sure the file explorer/switcher is just consult with find-file (or whatever Doom Emacs defaults to) and the side pane showing the symbols is lsp-treemacs-symbols. Not sure if there are vim equivalents, but I imagine thtere's probably something out there like them!
@andherium10 ай бұрын
Thanks man Also I've never seen a video where a person uses vim and emacs and nano 😂 let alone vim and emacs Also you sound like Luke Smith (Arch guy)
@markwood-patrick470511 ай бұрын
Great video, what VM were you using?
@rafi_45 Жыл бұрын
thank you so much for the explanation. this makes me understand how to use flakes. I am still using nix-channel to update my system. we need more nix content. and if you can please tell how do you config your desktop and emacs.
@teesh3rt9 ай бұрын
oh my god thank you! you just made flakes easy to understand for me! though, i want to split stuff up into multiple files, so that i can have stuff like "communication.nix" with stuff like discord and irc, and "games.nix" with stuff like wine and steam. how can i do that?
@ElliotWeishaar Жыл бұрын
Great video! I'm starting to test nixos as a daily driver and these video's are amazing! I still have some questions though. Once I have the flake set up, if I want to update my system do I modify `~/.dotfiles/configuration.nix` and then run `sudo nixos-rebuild switch --flake .` within the .dotfiles directory? I'm assuming updates are still done from within the configuration.nix file within the .dotfiles directory correct? Let me know if there is a different place to discuss. Thanks again for the great video series and keep them coming!
@librephoenix Жыл бұрын
That's what I do! You're absolutely correct! Passing the directory to `sudo nixos-rebuild switch --flake` will utilize the configuration.nix associated with that flake. Additionally, if you're not using a flake, any `sudo nixos-rebuild switch` will always use /etc/nixos/configuration.nix to rebuild unless you set the NIXOS_CONFIG env variable: `NIXOS_CONFIG=/path/to/configuration.nix sudo nixos-rebuild switch`
@saranvishva798211 ай бұрын
bro can get your hyperland configuration and which distro are you using
@handdarahanddara-nr6fu2 ай бұрын
Really good tutorial
@benjy28810 ай бұрын
I'm still not sure what advantages flakes have, it seems like you can go back to older versions of packages, but you can also do that by changing the channel you're running, does flakes give you the ability to change the version of one specific package instead of all packages on your system like changing the channel would do?
@adamduvick9 ай бұрын
Thanks for this video! I made the switch to flakes because of it! One question: I see this line in configuration.nix `system.stateVersion = "23.11";`. I believe this is the same version as was defined in my flake.nix `nixpkgs.url` (mine is slightly newer than yours in the vid). I feel like I should inherit that from the configuration.nix file or vice versa so as to not have to manage the info in two places. Can you speak to the best way to do that?
@zedddoctor10 ай бұрын
What browser are you using on your main system?
@mattiabonafini4026 Жыл бұрын
Thanks for the very clear video! I'll just subscribed...please keep it going. As far as I know pipewire is installed natively on NixOs. Is there a way to switch to Jack/Qjackctl/Alsa and use NixOs for pro audio. Pipewire is not ready at the moment, for my liking.
@librephoenix Жыл бұрын
Thanks! In terms of removing pipewire, I think you just need services.pipewire.enable = false; in your configuration.nix. I don't know if this completely breaks audio on a pipewire-by-default system though. There's the NixOS wiki pages on audio too, which you may find helpful: nixos.wiki/wiki/Category:Audio
@colin051610 ай бұрын
7:43 mind blown flakes are going to save my sanity while ricing
@kras_mazov2 ай бұрын
What happens to /etc/nixos/configuration.nix after updating with flake? Is it no longer used? Can you move ename your flake directory or is it a part of your system now?
@kastlekatofficial8839 Жыл бұрын
Great video, thank you for putting the time and effort into it! I just wanted to ask whether or not this setup uses the /etc/nixos/configuration.nix file. Since the flake.nix file references the configuration.nix in ~/.dotfiles, is the configuration in /etc just ignored? (when using --flake ~/.dotfiles)
@librephoenix Жыл бұрын
Thanks! In my setup, yes. All of my configuration is in ~/.dotfiles and /etc/nixos is ignored. Though, if you wanted you could put the flake.nix inside of /etc/nixos! In that case, you may need to run git commands with root tho
@michaelharmon55029 ай бұрын
@@librephoenix How does Nix know to look in your ~/.dotfiles directory instead of the default location?
@negserg763911 ай бұрын
Nice stuff! What web browser do you use? It reminds me tridactyl, but not exactly.
@librephoenix11 ай бұрын
Qutebrowser!
@Grizzlywer Жыл бұрын
I really like your tutorial as I learned something, but don't you have to manually edit the version of your nix flakes pakages everytime to update it?
@matthiaswolter42954 ай бұрын
Dont you have to create a symbolic link or change config environment variable when you copy the configuration.nix file ?
@RonVichar9 ай бұрын
Thank You. The other flake tutorials, made me want to go back to not use flakes, and pushed me to unstable-channel.
@arcstur6 ай бұрын
When updating the configuration.nix I should always run with --flake?
@sutalk123611 ай бұрын
Wallpaper name of purple trees? plz
@oglothenerd Жыл бұрын
Hello fellow small Linux KZbinr!
@librephoenix11 ай бұрын
Hello :D
@dosomething69755 ай бұрын
Lol 😂 subscribed to you both. Excited to try nixos
@oglothenerd5 ай бұрын
@@dosomething6975 First off, awesome! Second, NixOS is a must try... but you might find out that it isn't worth it. It was way easier and more rewarding to create a tool for any distro that mimics to some extent what NixOS does.
@maf_aka Жыл бұрын
very concise and clear video, but I'm still not convinced how flakes are useful? I think I get it but also why would I need another .nix file just to create flake.lock file which I won't ever interact with?
@MultiMunding9 ай бұрын
How do I get qemu to scale the monitor and allow copy paste to the VM? I can't get this to work in my nix VM :/
@100timezcooler4 ай бұрын
so are the etc/nixos files no longer used after this?
@wangfiox Жыл бұрын
讲的非常清楚
@bullpup1337 Жыл бұрын
sounds like this is the future… however it seems the migration is not quite straightforward. I have some packages from unstable in my config which seems to prevent the system from rebuilding for now - until I figure out how to fix that, that is
@CrazyMineCuber Жыл бұрын
Good video! I already know everything about flakes, but I think it is good for beginners. Maybe you could have explained the Nix language features a bit better that explaining them hand wavy and allowing a beginner to still think that it is black magic. So maybe explain that let allows you to bind variables and that {}: means to declare a function which takes a set and de-structures the arguments in the {}. So explain that outputs field can either be an attribute set or a function with the inputs field as input, and an attribute set as output.
@librephoenix Жыл бұрын
Thanks for the solid feedback! You may be right about my hand waving XD My original intention was to be a bit hand wavy for now so the video didn't get too long, but still provided a working config, while going into some of those more technical ideas in later video. But everything you mentioned is super important, so thanks for mentioning it!
@donaldmickunas855211 ай бұрын
Actually, I agree with the hand wavey part. Most users aren’t programmers. Burying them in the weeds of programming syntax, structure, and terminology will turn NixOS to a programmer’s only OS. This was meant to be a beginner tutorial and introduction to NixOS. It is one of the best I’ve seen.
@CrazyMineCuber11 ай бұрын
@@donaldmickunas8552 Well, Nix IS a programming language. So even if people have not programmed before, they have to learn it to some degree if they want to use NixOS. And therefore, they might as well learn the tricky stuff right at the beginning because otherwise that lack of knowledge will come back and bit them later.
@kach093710 ай бұрын
i followed along and got a flake.lock, does this mean that, if i wanted to reproduce my exact system (as it is according to the lock file) - then i just need to put the lock file on new system, then enable flakes and then, just sudo nixos-rebuild switch --flake would this then mean that, instead of reproducing my system via non flake configuration.nix and getting potentially different versions of packages if i do rebuild switch without --flake, does that just build my system according to the configuration.nix, and if i do it with --flake it rebuilds it according to the configuration.nix linked to the lock? (the 1 we put in .dotfiles)? god, the more i think about it, the more confused i am. this is what happens when someone without the skills just follows a tutorial, i only have more questions ... now i dont even know how to add and remove packages from my nix :D because i now have a flake :D haha
@mxmx2842 Жыл бұрын
Regarding the usage of flakes. Some packages can't be found as flakes. Does this matter ??
@zombizombi2 ай бұрын
Still not sure what the advantage of Flakes are over the traditional way.
@leonjulian3409Ай бұрын
I've been following your instructions in the video and it works fine, until I run "sudo nixos-rebuild switch --flake .", then I am not able to run the switch command again and my gdrive setup with rclone breaks, I don't know why this happens, I am quite new to NixOS, do you have any Idea, you explain very well btw and thanks for the video Edited: I solved it, it wasn't a problem with home manager but with how I set up rclone