Customize Nix Packages | Gentoo Experience on NixOS

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

ความคิดเห็น • 48

  • @vimjoyer
    @vimjoyer  2 หลายเดือนก่อน +10

    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/Vimjoyer/. You’ll also get 20% off an annual premium subscription.

  • @CrazyMineCuber
    @CrazyMineCuber 2 หลายเดือนก่อน +11

    The coolest thing with overlays in my opinion is that it allows you to for example in theory replace glibc with musl for all applications in nixpkgs, with just a 5 lines of code. It just feel so powerful that such a thing is even possible! Not super practical and would of course not work without issues, but still amazing!

  • @maticz3923
    @maticz3923 2 หลายเดือนก่อน +40

    Thanks to you and that "no boilerplate" channel, im now enjoying nixos (:

  • @s1n7ax
    @s1n7ax 2 หลายเดือนก่อน +14

    Bruh. This is the nix documentation we needed

  • @20windfisch11
    @20windfisch11 2 หลายเดือนก่อน +4

    You are one of the main reasons why I chose NixOS when I switched to Linux on my PC. I had planned Arch or Gentoo as I had used the latter in the past. The concept always appealed to me and I have been liking functional programming for a long time, but you made NixOS and especially the weird Nix syntax understandable. I am now running a setup with impermanence and ricing via Stylix on my PC and I always come back to your videos when I am unsure about some things. Although I haven‘t yet got the hang of Hyprland. Currently still on Gnome and Pantheon. But that‘s a matter of taste after all.

  • @Familex
    @Familex 2 หลายเดือนก่อน +14

    8:13 light theme jumpscare

  • @11WicToR11
    @11WicToR11 2 หลายเดือนก่อน +3

    this was totally missing, i needed this explanation years ago ...but we finally have it and with practical examples. Awesome content!

  • @XDtaylormagic
    @XDtaylormagic 2 หลายเดือนก่อน +1

    I literately was fighting a problem with my nixos config this morning and this video was able to help me fix it (needed to pin a zoom version)! Thank you so much!!

  • @khgoat
    @khgoat 2 หลายเดือนก่อน +2

    Awesome video as always! As a suggestion, maybe we could get a video on how to run dynamically linked executables on NixOS?

  • @harryw5622
    @harryw5622 หลายเดือนก่อน +1

    Thank you for your contribution to the entire Nix community!!!

  • @faeranne
    @faeranne 2 หลายเดือนก่อน +4

    I feel like the description of `final` still doesn't quite explain the power of overlays. It's not just the contents of the set your returning, it's the contents of `pkgs` after *every* overlay is applied. So if you pull in vim in one of your overrides, it still benefits from any changes to vim later on. I need to double check, but I believe this even includes overlays *inside* nixos configs. it's a recursive feature, which when you really comprehend it, can lead to some shockingly powerful code. For instance, in my configs I use it to change certain programs to patch out network access on desktop systems, vs on servers where that function is needed. I can still rely on that program in global overlays too, since it becomes part of final, despite being patched inside the nixosconfiguration.

  • @bulldoser2610
    @bulldoser2610 2 หลายเดือนก่อน +1

    OMG this channel needs to be featured on nixos website. You are doing gods work. BTW can you make a video on disko using flake? I think a lot of people would want a setup where uou download a minimal iso and run a single nix run command to partition drive and install nixos. Also it is a little confusing how to use the same flake on a system with nixos pre installes. I would really appreciate if you make a video on this topic. Even if you dont like and sub from me. Keep it up.

  • @Pawlash
    @Pawlash 2 หลายเดือนก่อน +4

    thanks for your videos! i switched from arch to nixos, and I don't think about going back - tho still dual booting windows

  • @0x1fe1
    @0x1fe1 2 หลายเดือนก่อน +2

    I finally understand how overlays work and how to use them! But i still cant find a way to update only a single package/a single link to nixpkgs (to keep it up to date) and leave the rest of the packages untouched, do you know how to do that or where can i look? (i tried searching, but could not find anything of use)

    • @kexec.
      @kexec. 2 หลายเดือนก่อน

      1. define flake input url for specific nixpkgs (for example, nixpkgs-unstable)
      1-1. If you don’t care about complexity, you can just
      inputs.nixpkgs-unstable.legacyPackages..
      or if you do care simplicity, try 2
      2. define overlays in flake.nix and nixpkgs.overlays in your nix config file. keep in mind, below code is pseudo code but you’ll know how it is going
      outputs.overlays.nixpkgs-unstable = final: prev: {nixpkgs-unstable = import inputs.nixpkgs-unstable { system=final.system; };}
      nixpkgs.overlays = [outputs.overlays.nixpkgs-unstable]
      3. You should be able to access the package by pkgs.nixpkgs-unstable.

  • @vcele
    @vcele 2 หลายเดือนก่อน +1

    Could you make a video about "Auto Updating NixOS" especially in the context of flakes and and a central repository for multiple hosts?

    • @vimjoyer
      @vimjoyer  2 หลายเดือนก่อน

      Sure, I'll add that to the list

  • @livingcodex9878
    @livingcodex9878 2 หลายเดือนก่อน +3

    I feel enlightened

  • @officialrajdeepsingh
    @officialrajdeepsingh 2 หลายเดือนก่อน +1

    Thank you. I'm looking for something similar.

  • @s0me1newithhand7s
    @s0me1newithhand7s 2 หลายเดือนก่อน +2

    wake up b.. debops, vimjoyer uploaded!

  • @szalaitibor9503
    @szalaitibor9503 2 หลายเดือนก่อน +1

    Thank you for your work, you are amazing! What I think is really helpful for anybody if you can can show us how can we read the documentation during the nix writing. Like javadoc or etc. Thank you if you can show us! 😊

  • @ruroruro
    @ruroruro 2 หลายเดือนก่อน +6

    You should really teach how to use overrideAttrs with the new (finalAttrs: prevAttrs: {}) style instead of the legacy (oldAttrs: rec {}) style.

    • @angeldude101
      @angeldude101 2 หลายเดือนก่อน

      Oh. I didn't know about that form, but it brings it more in-line with the overlays system.

    • @kexec.
      @kexec. 2 หลายเดือนก่อน

      I think you’re confusing override and overlays. override is just overlays but only super (prev) argument

    • @ruroruro
      @ruroruro 2 หลายเดือนก่อน +1

      @@kexec. no, I am not confusing anything. There is a new version of mkDerivation + overrideAttrs. It was introduced in nixpkgs PR #119942.
      After that, you should define derivations using
      mkDerivation (finalAttrs: {})
      instead of
      mkDerivation (rec {})
      and then modify the resulting derivations using
      overrideAttrs (finalAttrs: prevAttrs: {})
      instead of
      overrideAttrs (oldAttrs: rec {})

    • @kexec.
      @kexec. 2 หลายเดือนก่อน

      @@ruroruro yeah looks promising though it only supports mkDerivation. We still need to use rec for buildPythonPackage and so on.

    • @ruroruro
      @ruroruro 2 หลายเดือนก่อน

      @@kexec. You might be glad to hear that support for builders that extend mkDerivation is also coming soon (tm). See PR #234651

  • @richardbennett4365
    @richardbennett4365 2 หลายเดือนก่อน +1

    Are you sure rodi doesn't now also contain the code to work on wayland?
    I believe the rofi version that is current for other linux-based distributions works on wayland.

    • @vimjoyer
      @vimjoyer  2 หลายเดือนก่อน

      Not sure about other distros. It might work through xwayland

    • @richardbennett4365
      @richardbennett4365 2 หลายเดือนก่อน

      ​@@vimjoyer, yes,you're probably right about xwayland and rofi. Well, we can always do the test and find out.

  • @thiagoassisfernandes
    @thiagoassisfernandes 2 หลายเดือนก่อน +2

    damn, just what i needed!

  • @liesdamnlies3372
    @liesdamnlies3372 2 หลายเดือนก่อน +1

    This is damn cool. It’s a shame my only hang-up about NixOS as a new user is the drama in the community recently. I don’t understand it, I don’t think I want to understand it, and from the outside it just looks like a lot of mud-flinging by all sides (to put it politely). It doesn’t build much confidence in the distro when maintainers are quitting. Or getting banned(?) or whatever happened. All I know is I’m confused and definitely scared-off suggesting it for a professional environment for at least a year or two, despite still moving-ahead for my own personal use.

  • @kexec.
    @kexec. 2 หลายเดือนก่อน +1

    I feel you had to cover outputs.overlays (default output flake schema) instead of packing part since most your subscribers are nixos users, not nix developers. (even though this video is packaging video) I already saw the confusion in the comment section

    • @vimjoyer
      @vimjoyer  2 หลายเดือนก่อน +1

      Yeah

  • @ДашаГолік
    @ДашаГолік 2 หลายเดือนก่อน +1

    👍thanks

  • @coffee-is-power
    @coffee-is-power 2 หลายเดือนก่อน +2

    first

    • @vimjoyer
      @vimjoyer  2 หลายเดือนก่อน

      Indeed

  • @arkoprovoshaw5737
    @arkoprovoshaw5737 2 หลายเดือนก่อน +1

    noooo not first

  • @intermarer9145
    @intermarer9145 2 หลายเดือนก่อน +1

    You lost me within 2 minutes. I think I am stupid.

  • @xorlop
    @xorlop 2 หลายเดือนก่อน +1

    I had no idea what overrideAttrs did, but now I do! Thank you!

  • @Raftzard
    @Raftzard 2 หลายเดือนก่อน +1

    This video demonstrates how possible it is to use nixos the gentoo way, using nixpkgs mojo :P