Ultimate Nix Flakes Guide

Поділитися
Вставка
  • Опубліковано 23 сер 2024
  • Discord server: / discord
    Support the channel: ko-fi.com/vimj...
    Nix flakes wiki: wiki.nixos.org...
    Flake URL syntax examples: nix.dev/manual...
    more code coming soon, I'm going to sleep now

КОМЕНТАРІ • 107

  • @vimjoyer
    @vimjoyer  Місяць тому +89

    I killed my voice recording this

    • @RazoBeckett.
      @RazoBeckett. Місяць тому +9

      Take care bro.

    • @IntergalacticTurtleFucker
      @IntergalacticTurtleFucker Місяць тому

      Bro calm down then

    •  Місяць тому +1

      If I could, I would send you some Lemon & Honey tea. GREAT for the voicebox!

    • @hueyPneutron
      @hueyPneutron 15 годин тому

      rest up king

  • @DooMWhite
    @DooMWhite Місяць тому +55

    This might be one the best guides in the internet I've ever seen.

    • @simonlauer9379
      @simonlauer9379 Місяць тому +4

      @@DooMWhite yes it’s very concise and well structured

  • @MichaelWrightPlus
    @MichaelWrightPlus Місяць тому +22

    I always feel that when I am not quite getting something in the nix ecosystem, I can watch a vimjoyer video about the topic and it is like a burst of enlightenment where now I can see everything I was missing before! Thanks so much for this amazing content!

  • @jols4808
    @jols4808 Місяць тому +32

    Vimjoyer Nix videos = Masterpiece 🗣️

  • @dr_regularlove
    @dr_regularlove Місяць тому +14

    This is the most thorough and clear explanation of what a flake is that I've found, including your past videos. Great job!
    I'm looking forward to your future video on devshells. I already use them, but I could be using them better I am sure of it!

  •  Місяць тому +6

    I really appreciate your video style. The arrow moving around while you talk about the parts of the configuration is brilliant! It activates my visual-learning even better than just reading along. Much better for me than just listening to the description. I also appreciate how clean and clear all the textual information is. Your voice is clear enough and I can certainly follow what you say. But your accent, cadence, and where your voice goes up or down at parts of the sentence is not "natural" to my ear, being conditioned much more to a "midland" American English dialect. The implication is that it that when listening to a lot of dense information in a less-familiar accent, I find I have to go back and re-hear many times for the comprehension to sink in. The visual aid helps quite a lot. I really like it. Thank you, Vimjoyer! ( vim-joy-er? You love Vim? 😁) Please be encouraged to keep putting out great Nix content. You're definitely appreciated!

  • @thiagoassisfernandes
    @thiagoassisfernandes Місяць тому +26

    I would love to see a video about overrides and overlays...

    • @vimjoyer
      @vimjoyer  Місяць тому +18

      That one's surely coming

    • @thiagoassisfernandes
      @thiagoassisfernandes Місяць тому +5

      @@vimjoyer i'm glad, can't wait! but do take care of your voice
      I have been trying for a few days to make an overlay/override for libreoffice-qt6-fresh, because of some compile flags on my systems it fails at checkphase... but cant for the life of me... wrapped and unwrapped packages are particularly difficult

  • @ketaminefairy
    @ketaminefairy Місяць тому +2

    I've learned more about flakes and also the nix language itself by reproducing your examples and also experimenting with changing things little by little than I've ever managed from just trying to read some docs online.
    Hands down best explanation on flakes I've seen so far in the small amount of time I've been part of this community. Thank you so much for all the work and effort you put into this, you're contribution is invaluable to many of us

  • @karmicbacklash3763
    @karmicbacklash3763 Місяць тому +6

    I remember asking about this very thing a while back and I'm so happy to see you doing it now.

  • @faccc
    @faccc Місяць тому +3

    I’m tearing, I’ve been using flakes for some months now, have a full fledged multi-host config, but many areas were still obscure to me. Your videos are illuminating in many small big ways, I can’t thank you enough, keep it going!

  • @ToadalChaos
    @ToadalChaos Місяць тому +7

    I just installed NixOS the other day and was wondering about flakes. Perfect timing!

  • @AndreiSilvester
    @AndreiSilvester Місяць тому +1

    Good, i am finally beginning to grasp nix and flakes - this is one of the few videos that explains them well.

  • @LieutenantP1ckle
    @LieutenantP1ckle 18 днів тому +1

    thrown into the nix deepend at work, these have been a godsend, thank you
    btw your animations are very smooth and impressive, great way to show your code changes as you demonstrate, that extra effort really shines through

  • @borisknows
    @borisknows Місяць тому +5

    Love your Nix videos. Keep up the great work. Great explanations and very easy to understand and follow. Your channel is what got me back to NixOS after not using it for over couple of years.

  • @m.a.jaafouri5066
    @m.a.jaafouri5066 6 днів тому +1

    After weeks of confusion this clarifies a lot. Thank you

  • @TobiasFrei
    @TobiasFrei Місяць тому +1

    Many thanks. Just what I needed, as I started reorganizing the configs of 3 hosts running NixOS inside a flake yesterday 🙏🤓

  • @Alfablos
    @Alfablos 4 дні тому +1

    This really should be linked in the nix flakes documentation!

  • @kevinkinney1021
    @kevinkinney1021 Місяць тому +1

    This is the intro to flakes that I've been looking for, thank you!!!!

  • @gabbieblue
    @gabbieblue Місяць тому +3

    the only problem i have ever had with nix is the accessibility of the documentation, thank you for completely destroying this issue

  • @kylejamesross
    @kylejamesross Місяць тому +1

    Man I wish I had seen a video like this before jumping in and building my config. Demystifies a lot of knowledge gaps in using flakes.

  • @alunarnova
    @alunarnova Місяць тому +1

    THANK YOU SO MUCH! I really struggled to understand what was going on in nix flakes, this video is hugely helpful to me.

  • @bigl9527
    @bigl9527 Місяць тому +1

    This channel keeps my sanity when learning and using NixOS. Bless the man

  • @mstk8952
    @mstk8952 Місяць тому +7

    Absolute Cinema

  • @kernelpanic_init1
    @kernelpanic_init1 Місяць тому +7

    It is 2 a.m. here. So an excellent timing for the video :D

  • @NathBeLive
    @NathBeLive Місяць тому +4

    Awesome Vid! Your vids have been getting into NixOS a fun experience. On a different note, I guarantee most can't hear this, but you have a kinda springy boingy ring sound when you speak in your mic in the background. I am using a good set of audiophile headphones and loud volume, so it's not noticeable to most. But I thought you should know. It may be due to mic shake or what ever you are recording on not being stable.

    • @vimjoyer
      @vimjoyer  Місяць тому +2

      Audio is my enemy. I know what you're talking about, I'll try to fix it.

  • @bastiana3611
    @bastiana3611 Місяць тому +2

    Ey! Awesome video man, love to see the slightly longer versions as I feel some of your older videos could go a bit more in depth. :)

  • @rodneymkay
    @rodneymkay Місяць тому +5

    The editing on this video is amazing 😍

    • @vimjoyer
      @vimjoyer  Місяць тому +2

      And the next videos are going to be even better

  • @AngriestEwok
    @AngriestEwok 23 дні тому +1

    Thanks.
    FYI:
    experimental-features = nix-command flakes
    You're missing the 's' at the end at 1:38.

  • @sachinchaudhary1310
    @sachinchaudhary1310 Місяць тому +2

    ok this is the understandable video for flakes, i don't think a noob will but i can lol

  • @matthias2447
    @matthias2447 14 днів тому +2

    Yeah, this is a masterpiece 🎉

  • @noahmihalik4661
    @noahmihalik4661 Місяць тому +1

    The slower pace, detailed explanation/dissection of the flake makes this my favorite video of yours, I was often references your videos, but as a novice found them a little too fast paced and lacking some details especially if I ran into an error or my output was different than yours and had to scour forums and discord to figure it out. Your videos have always been top-notch, but this is the best nix/nixos/flake tutorial video I've seen, and it feels like your setting us up for success. But, as a beginner I always wished someone would literally just pull up a github repo with a flake.nix and show exactly how to use the provided flake.nix in that repo. Never seen anyone do that.
    While typing this I also realized you've never shown how to manage your nix config with git!
    P.S. would love to see a nixos self-hosted server setup video/series by you on editing remote nixos configs, containerization, nextcloud, vpns, etc.

    • @vimjoyer
      @vimjoyer  Місяць тому +1

      Yeah, I got a lot of comments talking about fast pace before, so I am trying to keep it slower. I too didn't realize I've never made a nix git video, so I definitely will make one in near future.
      Thanks for kind words!

  • @jefferyosei101
    @jefferyosei101 Місяць тому +1

    This is such a good video, thank you! ❤

  • @untitled8027
    @untitled8027 Місяць тому +2

    This deff helped me understand a bit more and I really appreciate your videos on nix. I'm still super confused though, I had to stop using nix even tho it was only a side-project system because there were a few programs I couldn't figure out how to use on nix (ly greeter for example) I hope it was just a misunderstanding on my part. Someday I'll spend more time trying to better understand how to use NixOS but it's incredibly hard to wrap my head around it all.

    • @vimjoyer
      @vimjoyer  Місяць тому

      Just take your time. The nix ecosystem is very huge, so many problems have several solutions, and it's not always clear which one's better or worse.

  • @samelie
    @samelie 17 днів тому

    Fantastic series. You are a scholar god

  • @yash1152
    @yash1152 17 днів тому +2

    this comment is subjected to frequent edits (even in future), so any generous hearts given by creator are automatically removed after an edit :)
    3:36 "nix flake show" to show the output attributes provided
    11:14 "nix flake metadata" to show what the nixpkgs resolve to i.e. commit-hashes of inputs
    7:25 url like syntax used in input, and various examples (gh, gl, srch, local, ...)
    9:55 the at @ syntax for arguments in nix language
    12:52 nixos configuration in flake via nixosSystem function
    13:47 auto-picking of flake at default location
    13:58 14:25 using specialArgs attribute in flake.nix to supply as input param to configuration.nix
    (this is useful for nixos-hardware for example)
    update: no, this does NOT work for using nixos sl-a-sh nixos-hardware
    that has to be specified in flake.nix itself as guided in that repo's readme

    • @vimjoyer
      @vimjoyer  17 днів тому

      hearts are free, I can give them to you all day

    • @yash1152
      @yash1152 17 днів тому

      @@vimjoyer oh lol. thanks a lot :)
      > _" hearts are free, I can give them to you all day "_

  • @deeppanchal1332
    @deeppanchal1332 Місяць тому +1

    Video quality is amazing!! Thanks for these helpful videos!! Do you plan on making a guide to setup nvidia with Wayland along with video acceleration support?

  • @TheColorman
    @TheColorman Місяць тому +1

    My biggest issue with flakes is that I prefer to keep my configs extremely modularized, which doesn't really work very well with flakes, since you can only use inputs/modules that are in the current directory or in a child directory.
    That means you can't extract several host configs out into separate subdirectories, then have them import a fully configured config for a specific program in a parent directory.

  • @unga02
    @unga02 Місяць тому +1

    Thank you so much for this video! Learned a lot. ❤

  • @Blu3Souls
    @Blu3Souls Місяць тому +1

    I'd love to see a video explaining all the parameters a module receives and where they come from.
    That has been a major point of confusion for me.

  • @spogs
    @spogs Місяць тому +1

    I feel like one thing I’m always missing in these videos about Flakes is the answer to the question: Why should I even use Flakes?

    • @vimjoyer
      @vimjoyer  Місяць тому

      Basically, the lock mechanism. If you manage separate projects with separate flakes, you won't potentially break them just by updating your system.
      Also systems/devshells/packages managed by flakes are easier to reproduce on other machines.

  • @Zeyad_Assem
    @Zeyad_Assem Місяць тому +1

    I like you type of videos it simplify everything 🥰
    What are you doing to make videos with that quality?

    • @vimjoyer
      @vimjoyer  Місяць тому +1

      I'm using motion canvas

  • @umbergrove
    @umbergrove Місяць тому +2

    It all makes sense now

  • @yash1152
    @yash1152 17 днів тому +1

    okay, i was looking for "setting up nixos for c++ development" (or python, or java, or whatever)
    this vid doesn't cover that
    but i learnt various other things nonetheless.

    • @vimjoyer
      @vimjoyer  17 днів тому

      The title says nothing about python, or java, or whatever

    • @yash1152
      @yash1152 17 днів тому

      @@vimjoyer good point 😃
      yeah, while commenting, i forgot that i came here from other video "nix dev envs"
      > _" The title says nothing about python, or java, or whatever "_

  • @pmerikan
    @pmerikan Місяць тому +1

    As always, very informative. Well done.
    One question though, how do I know which functions/variables are available and the name of these?

    • @vimjoyer
      @vimjoyer  Місяць тому +1

      In random flakes you can usually just check the outputs, but in bigger ones like nixpkgs you have to rely on documentation / analyze the nix code

  • @cariyaputta
    @cariyaputta Місяць тому +3

    So complicated.

  • @cristhiamtovar9003
    @cristhiamtovar9003 Місяць тому +1

    Just the video I was asking for.:w

  • @hadockzin
    @hadockzin Місяць тому +2

    What a video my friends

  • @SpaceLime
    @SpaceLime Місяць тому +2

    Thank you so much! You're videos and the technology behind nix is the most exciting thing in the IT world in my opinion. However the recent banning of contributors not deemed woke enough had been a complete turn off for me. And I seriously doubt the project have a bright future because of this. I'm really curious to here you're thoughts on this?

    • @vimjoyer
      @vimjoyer  Місяць тому +2

      There are countless companies and users relying on nix ecosystem, so I don't see it collapsing any time soon. I wouldn't worry about it too much

  • @abelgerli
    @abelgerli Місяць тому +1

    Managing networks ip6 & ip4 as well as vlans would be interesting. Is it possible to rename the hardware Ethernet cards so the config gets more flexible by using aliases ?

  • @nokomoko8832
    @nokomoko8832 День тому +1

    individual packages versions depend on the nixpkgs version? ehh

  • @s0me1newithhand7s
    @s0me1newithhand7s Місяць тому +1

    actually, good vid, but after time of using nixos flakes became much.. much bigger and complicated. :D

  • @heskan
    @heskan День тому

    I tried your old Flakes Guide, it didn't work so I switched to this more recent one since I couldn't use flakes and home-manager despite allowing experimental features in the config (even with the override), now I tried to undo everything and start from scratch but now I can't rebuild my system to allow for flakes because I already have Flakes installed, but the Flake installed does not allow for the rebuild command, and I cannot change it because I don't know what is wrong with the old flake and I cannot uninstall it because that would require a rebuild that I'm not allowed to do
    and for some reason my gen 1 nixos has the changes, so i have nothing to roll back to

  • @3zRides
    @3zRides Місяць тому +1

    Lol just what I was looking for

  • @juca8001
    @juca8001 13 днів тому +1

    Awesome. Could you share your dotfiles? Thanks.

    • @vimjoyer
      @vimjoyer  13 днів тому

      github.com/vimjoyer/nixconf

  • @tommyb2467
    @tommyb2467 Місяць тому +1

    Thanks

  • @DeadEyez1710
    @DeadEyez1710 Місяць тому +1

    Cinema

  • @ARed11
    @ARed11 Місяць тому +1

    gud videuo tnks.

  • @mrpro2264
    @mrpro2264 16 днів тому +1

    i want to make my terminal like you pro how i can do it (i am new to linux and i am using kde de)

    • @vimjoyer
      @vimjoyer  16 днів тому

      The terminal you see in this video is not real, it's just editing. For a real setup, I recommend using a modern terminal emulator like Alacritty and pairing it with a powerful shell like Fish.

  • @thechadbuddha
    @thechadbuddha Місяць тому +2

    tr00nix

  • @quodsto
    @quodsto Місяць тому +2

    Hi

  • @intermarer9145
    @intermarer9145 Місяць тому +1

    I fell off around 8:30 somewhere... sigh

  • @simonlauer9379
    @simonlauer9379 Місяць тому +1

    can you make something on nix ld?

  • @aggranular
    @aggranular Місяць тому +1

    Great video, as always. However it feels incomplete: it should have mentioned some drawback of flakes so users could also know why they might not to use them just yet (until those issues get resolved). Also, the flake you wrote for the video wouldn’t work on MacOS (are any non x86 Linux system) which is also not mentioned. I hope you’ll release a follow up addressing these.

    • @aggranular
      @aggranular Місяць тому +1

      Most of my colleagues at work use MacOS so I can’t share this video with them since the flake would simply fail to work on their system 😢

    • @vimjoyer
      @vimjoyer  Місяць тому +5

      I said that the flake will look slightly different depending on your system architecture. It's just a matter of not changing Darwin to Linux when you initialize the flake.

  • @silentroach
    @silentroach Місяць тому +1

    все время удивляюсь рандомным ударениям на слова ) выделяй те же слова, что выделил бы на русском, пожалуйста)

  • @1234minecraft5678
    @1234minecraft5678 Місяць тому +1

    I seem to be unable to use UEFI boot. 😢

    • @vimjoyer
      @vimjoyer  Місяць тому

      I don't think this issue is related to flakes. Consider opening an issue on github.

    • @1234minecraft5678
      @1234minecraft5678 10 днів тому

      @@vimjoyer Thanks for the reply! Yes it is probably not, maybe the way i installed it or something :) Thanks :)

  • @TimmmmCam
    @TimmmmCam Місяць тому +2

    "The 'legacy' in 'legacyPackages' doesn't imply that the packages are 'legacy' packages." ... ok then why did you call it `legacyPackages` then? This is git-level shoddy naming.

  • @otocotara
    @otocotara Місяць тому +2

    firs- second...

  • @abbcc555
    @abbcc555 Місяць тому +2

    Very archaic and unnecessarily convoluted system. All of this is made infinitely worse by the unbelievably useless errors the thing spews out sometimes. There are some GUI configurator projects going on. When some of those or some better wrapper language/format gets traction all of this nonsense can be forgotten.

    • @vimjoyer
      @vimjoyer  Місяць тому +1

      It's only convoluted because the ecosystem is very old, and does a lot of things. I agree that the errors are absolutely useless most of the time, but still I feel like flakes are a step in a good direction.

  • @Slit1409
    @Slit1409 Місяць тому +3

    Your best video yet 🎉

    • @vimjoyer
      @vimjoyer  Місяць тому +3

      Thanks! It took much more time to edit than usual

  • @Jdizzle111
    @Jdizzle111 Місяць тому +2

    This is exactly what I needed man thank you this is perfect timing 🫶