Next video in the series is available here: ua-cam.com/video/IiyBeR-Guqw/v-deo.html It's about home manager, which is a Nix tool for managing dotfiles in your $HOME.
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!
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.
@@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.
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! ❤️
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!
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 :)
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 :)
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!
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.
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
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.
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!
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.
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.
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
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.
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?
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.
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!
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.
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
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.
@@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.
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
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!
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?
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!
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!
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?
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.
@@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.
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
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.
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?
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!
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?
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?
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!
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`
So what does it actually do? After following your video, I now have this flake file and a lock file... but to install an application, I still have to add it to my /etc/nixos/configuration.nix file and then run nixos-rebuild switch , like I did before? I don't understand how/why anything is any different.
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.
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
while using flakes instead of channels, and say im updating my os, should i remove the older one from the list using sudo nix-channel --remove and then add the latest one using --add. or should i just leave them as it is and just change them inside the flakes,nix file ?
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?
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
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)
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
Next video in the series is available here: ua-cam.com/video/IiyBeR-Guqw/v-deo.html It's about home manager, which is a Nix tool for managing dotfiles in your $HOME.
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?
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!
I'm glad this helped you!
For me, the fact they are still labeled as an experimental feature makes me think it’s not stable or mature enough yet
So true about the explanation of why to use flakes.
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.
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
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 ."
but /nix/store is owned by root and I get a permission denied then
@@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.
This is hands down the best flakes explanation I have ever seen!
are you stupid
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
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.
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.
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.
Thanks so much!
I especially appreciate the time taken to explain the different syntactical forms for some of the nix file items.
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! ❤️
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!
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 :)
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 :)
By far the best explanation of flakes I've been able to find, thank you!
one of the best introductions into flakes, thank you!
This madman is switching back and forth between vim and emacs xd
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!
Clear, concise and to the point. You made flakes finally click for me. Thank you!
Thanks for this, I now finally know the relationship between nix flakes and the regular nixos configuration
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.
More Nix content please! Modularizing from scratch would be super useful.
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
I kind of felt tis is like Dockerfile with Podman. Pretty cool either way.
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.
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!
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.
I have been using flakes for two years now but this was still very useful. I love the style of refactor with explanation
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.
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
Love the video! Great explanation, now I can finally use flakes without being confused.
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.
Thank you so much for this tutorial flakes finally make since now!
Thanks, man. I've been struggling with flakes for a while now and this tutorial helped me a lot. Thanks a lot
This video did so much for me to actually //understand// what is going on inside a nix file
Finally an easy-to-digest intro for beginning the flakes journey!
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?
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.
Glad it was helpful! Definitely more tutorials on their way, once I get around to making them :)
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!
Thanks! I'm glad you found it useful! :)
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.
Thanks for making flakes simple loved the video.
Great video, very clear. For me it would be published (together with the home-manager one) in the home page of nixos official website!
perfect video for beginners to nixos! thank you very much :)
Amazing! Your channel is the only good source of nix.. knowledge / understanding that I know
Thanks! Glad you find the Nix content helpful!
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
Thank you so much. Demystified flakes for me!
Very very cool mate thanks! Nicely articulated!
Fantastic explanation. Keep em coming!
great explanation, thank you! please keep them coming!
Thank you for this
I had to write which config to use like so "sudo nixos-rebuild switch --flake .#nixos-tutorial" or else I would get an error.
Same with me, thanks for the solution
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"
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.
@@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.
Very good presentation. Question: How did you visualize the structure of the flake in your Emacs like that?
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
Thank you! You made flakes much more approachable for me.
Glad you found it helpful! :)
Good work! Keep it up! 🎉
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!
Thanks! :)
Fantastic video, straight to the point but also lots of content. Seems like a great place to start!
this was really useful and well explained ❤
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?
awesome video! thank you so much!
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!
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!
I like this guide cause you explain the basics and the advanced in order
:)
Thanks! I'm glad you found it useful!
This helps a lot, thanks!
Super helpful, Thank you!.
Really great content, fantastic teacher!
Great video!
This was a wonderful explanation! Do you have any videos on dev shells?
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 :)
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?
best video for flakes i every seen
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.
Hello fellow small Linux UA-camr!
Hello :D
Lol 😂 subscribed to you both. Excited to try nixos
@@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.
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
Thank you very much for your guides! Btw, which browser are you using? It seems funny and vim like.
bro can get your hyperland configuration and which distro are you using
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.
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?
Very good video. Liked!
I’m enjoying your videos! May I know what is that file explorer you are using in your vim? Thanks in advance!
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!
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?
Really good tutorial
When updating the configuration.nix I should always run with --flake?
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 :/
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?
Sorry still confused, but this video makes it a bit clearer.
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!
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`
So what does it actually do? After following your video, I now have this flake file and a lock file... but to install an application, I still have to add it to my /etc/nixos/configuration.nix file and then run nixos-rebuild switch , like I did before? I don't understand how/why anything is any different.
You enable flakes, then run sudo nixos-rebuild boot (or switch) --flake PATH_TO_FLAKE
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)
Thank You. The other flake tutorials, made me want to go back to not use flakes, and pushed me to unstable-channel.
at 20:00 why would I define lib within that block vs putting it in the outputs like {self, nixpkgs, lib, ... }
Dont you have to create a symbolic link or change config environment variable when you copy the configuration.nix file ?
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.
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
What browser are you using on your main system?
Great video, what VM were you using?
Wallpaper name of purple trees? plz
so are the etc/nixos files no longer used after this?
while using flakes instead of channels, and say im updating my os, should i remove the older one from the list using sudo nix-channel --remove and then add the latest one using --add. or should i just leave them as it is and just change them inside the flakes,nix file ?
讲的非常清楚
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?
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?
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
7:43 mind blown flakes are going to save my sanity while ricing
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)
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
@@librephoenix How does Nix know to look in your ~/.dotfiles directory instead of the default location?
Nice stuff! What web browser do you use? It reminds me tridactyl, but not exactly.
Qutebrowser!
Regarding the usage of flakes. Some packages can't be found as flakes. Does this matter ??