NixOS Tutorial - How To Use Channels & Modules
HTML-код
- Опубликовано: 28 май 2024
- In this episode we continue to explore NixOS and move on to slightly more advanced usage scenarios.
NixOS channels are more than just package repositories they also define the nixos modules that go with packages. Modules are the mechanism NixOS uses to generate configuration files and service files for applications.
Timecodes
00:00 - Intro
00:34 - nix Channels
01:20 - why mutliple channels?
02:30 - installing from alternat channels
04:25 - using nixos modules from alternate channel
10:23 - nix-shell introduction
14:33 - recap and conclusion - Наука
You're a gem of a channel! Thanks for this. Mixing unstable and stable channels is something I felt was possible but it's nice to have a concrete example.
You also explain things very well :)
Thank you for saying I'm glad this video was helpful, I will be doing one on nix flakes shortly that will also demonstrate this functionality which is accomplished very differently in flakes
@@WhyDoesNothingWork I've been struggling very hard to understand how to mix my flakes and non-flakes config together.
Right now, I just have a barebones flake which pulls in configuration.nix and that pulls in all the modules.
@@tobzdaman619 I have a video that may help i just posted today ruclips.net/video/9JFZ-xIEzkE/видео.html
You explained well, thank you. Do you have to define a package twice: services + environment.systemPackages ? It only works with service or programs. Without entry an app in environment.systemPackages. For example: programs.zsh.enable = true; Or I misunderstood?
No for services that you enable you don't have to specify the package as well, but there is no harm in doing it I both places
That's called a Frakensystem!!!
😮😮😮😢
He just mixed packages from two different channels on his machine.
Definitely not recommended to make a Frankenstein operating system!!!
Especially with NixOS.
That system is crying under the hood for what he did to it!!!
No.
Ha ha ha. I just caught the name of this person's channel.
No wonder he chose that name for his channel!!!
😅😅😅
unless you're messing with package and services that are core to the system using packages and modules from a different channel is generally harmless, and you can always just roll back a generation if it does cause issues. I manage hundreds of NixOS systems and have rarely had any issues