The Nix Hour is a weekly beginner-oriented improvised QA-style lecture on Nix, hosted by Tweag. Here you can bring your questions and we'll answer them with more context, examples, alternatives, tradeoffs and related topics. These meetings are open for anybody to join, but also recorded and uploaded to the Tweag YouTube channel. For more information check out https://discourse.nixos.org/t/the-nix-hour-a-weekly-nix-qa-lecture-by-tweag/22767
Curated by: Tweag by Modus Create (81 videos)
The Nix Hour is an open beginner-oriented Q&A-style lecture on Nix, where you can bring your questions and we’ll answer them with more context, examples, alternatives, tradeoffs and related topics. Files from this session: https://github.com/tweag/nix-hour/tree/master/32 Jitsi Meeting to ask questions directly: https://meet.jit.si/nix-hour Matrix room for questions, feedback and notifications: https://matrix.to/#/%23nix-hour:matrix.org Issue tracker for asynchronous questions: https://github.com/tweag/nix-hour/issues Previous sessions playlist: https://www.youtube.com/playlist?list=PLyzwHTVJlRc8yjlx4VR4LU5A5O44og9in For more information and updates, check out https://discourse.nixos.org/t/the-nix-hour-a-weekly-nix-qa-lecture-by-tweag/22767 00:00 Intro 00:47 Q: How to extend nixpkgs.lib or builtins 01:28 Simple example, adding new fetcher to nixpkgs lib 02:26 lib.extend: overlay system for lib 03:14 Aside: evaluating function with all default args from cli 03:54 Why we can't use //, injecting new lib into NixOS module 06:49 Extending builtins by redefining the name builtins 08:32 builtins.scopedImport 10:38 Dangers and usecases of scopedImport 13:33 Adding builtins using Nix plugins 16:25 Adding custom fetcher with nixpkgs overlays, pkgs.extend, pkgs.appendOverlays 17:58 When use self and super or final and prev in overlays 19:34 Self-refferential packages using makeOverridable 22:16 Recursion using overrides 24:53 Overriding self-refferential derivation, why use super only on top level of the overlay 27:43 Looking for Nix plugins 29:53 Trying Nix plugin from nix-doc project 32:54 Overriding nix as a dependency for a plugin 37:20 aside: Evaluating NixOS config 40:50 Debugging dependency override 49:27 Using user's nix.conf 53:20 Exposing a value from inside NixOS module system 56:10 Testing final nix-doc configuration 58:55 Out of time