Customize Nix Packages | Gentoo Experience on NixOS

Поделиться
HTML-код
  • Опубликовано: 22 дек 2024

Комментарии • 49

  • @vimjoyer
    @vimjoyer  5 месяцев назад +11

    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.

  • @maticz3923
    @maticz3923 5 месяцев назад +48

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

  • @s1n7ax
    @s1n7ax 4 месяца назад +19

    Bruh. This is the nix documentation we needed

  • @CrazyMineCuber
    @CrazyMineCuber 5 месяцев назад +13

    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!

  • @20windfisch11
    @20windfisch11 5 месяцев назад +5

    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 5 месяцев назад +15

    8:13 light theme jumpscare

  • @11WicToR11
    @11WicToR11 5 месяцев назад +3

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

  • @harryw5622
    @harryw5622 3 месяца назад +1

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

  • @XDtaylormagic
    @XDtaylormagic 4 месяца назад +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 4 месяца назад +3

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

  • @faeranne
    @faeranne 4 месяца назад +5

    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.

  • @Pawlash
    @Pawlash 5 месяцев назад +4

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

  • @s0me1newithhand7s
    @s0me1newithhand7s 4 месяца назад +2

    wake up b.. debops, vimjoyer uploaded!

  • @bulldoser2610
    @bulldoser2610 4 месяца назад +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.

  • @aquau5777
    @aquau5777 5 дней назад +1

    3:43 not the cargo mommy dependency 😭

  • @livingcodex9878
    @livingcodex9878 5 месяцев назад +3

    I feel enlightened

  • @vcele
    @vcele 4 месяца назад +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  4 месяца назад

      Sure, I'll add that to the list

  • @officialrajdeepsingh
    @officialrajdeepsingh 4 месяца назад +1

    Thank you. I'm looking for something similar.

  • @0x1fe1
    @0x1fe1 5 месяцев назад +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. 4 месяца назад

      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.

  • @thiagoassisfernandes
    @thiagoassisfernandes 5 месяцев назад +2

    damn, just what i needed!

  • @szalaitibor9503
    @szalaitibor9503 4 месяца назад +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! 😊

  • @richardbennett4365
    @richardbennett4365 5 месяцев назад +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  4 месяца назад

      Not sure about other distros. It might work through xwayland

    • @richardbennett4365
      @richardbennett4365 4 месяца назад

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

  • @liesdamnlies3372
    @liesdamnlies3372 5 месяцев назад +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.

  • @ruroruro
    @ruroruro 5 месяцев назад +6

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

    • @angeldude101
      @angeldude101 5 месяцев назад

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

    • @kexec.
      @kexec. 4 месяца назад

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

    • @ruroruro
      @ruroruro 4 месяца назад +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. 4 месяца назад

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

    • @ruroruro
      @ruroruro 4 месяца назад

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

  • @ДашаГолік
    @ДашаГолік 4 месяца назад +1

    👍thanks

  • @kexec.
    @kexec. 4 месяца назад +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

  • @coffee-is-power
    @coffee-is-power 5 месяцев назад +2

    first

  • @arkoprovoshaw5737
    @arkoprovoshaw5737 5 месяцев назад +1

    noooo not first

  • @xorlop
    @xorlop 5 месяцев назад +1

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

  • @intermarer9145
    @intermarer9145 5 месяцев назад +1

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

  • @Raftzard
    @Raftzard 5 месяцев назад +1

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