Ultimate Nix Flakes Guide

Поделиться
HTML-код
  • Опубликовано: 20 авг 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

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

  • @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!

  • @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

  • @jols4808
    @jols4808 Месяц назад +32

    Vimjoyer Nix videos = Masterpiece 🗣️

  • @MichaelWrightPlus
    @MichaelWrightPlus Месяц назад +21

    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!

  • @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!

  • @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

  •  Месяц назад +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!

  • @m.a.jaafouri5066
    @m.a.jaafouri5066 3 дня назад +1

    After weeks of confusion this clarifies a lot. Thank you

  • @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!

  • @Alfablos
    @Alfablos 2 дня назад +1

    This really should be linked in the nix flakes documentation!

  • @karmicbacklash3763
    @karmicbacklash3763 Месяц назад +6

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

  • @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

  • @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 16 дней назад +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.

  • @TobiasFrei
    @TobiasFrei Месяц назад +1

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

  • @mstk8952
    @mstk8952 Месяц назад +7

    Absolute Cinema

  • @kevinkinney1021
    @kevinkinney1021 Месяц назад +1

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

  • @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.

  • @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

  • @kernelpanic_init1
    @kernelpanic_init1 Месяц назад +7

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

  • @bigl9527
    @bigl9527 Месяц назад +1

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

  • @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.

  • @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.

  • @rodneymkay
    @rodneymkay Месяц назад +5

    The editing on this video is amazing 😍

    • @vimjoyer
      @vimjoyer  Месяц назад +2

      And the next videos are going to be even better

  • @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. :)

  • @sachinchaudhary1310
    @sachinchaudhary1310 Месяц назад +2

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

  • @samelie
    @samelie 14 дней назад

    Fantastic series. You are a scholar god

  • @matthias2447
    @matthias2447 12 дней назад +2

    Yeah, this is a masterpiece 🎉

  • @AngriestEwok
    @AngriestEwok 20 дней назад +1

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

  • @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!

  • @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.

  • @jefferyosei101
    @jefferyosei101 Месяц назад +1

    This is such a good video, thank you! ❤

  • @cariyaputta
    @cariyaputta Месяц назад +3

    So complicated.

  • @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.

  • @hadockzin
    @hadockzin Месяц назад +2

    What a video my friends

  • @yash1152
    @yash1152 15 дней назад +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  14 дней назад

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

    • @yash1152
      @yash1152 14 дней назад

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

  • @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.

  • @umbergrove
    @umbergrove Месяц назад +2

    It all makes sense now

  • @unga02
    @unga02 Месяц назад +1

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

  • @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.

  • @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?

  • @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

  • @cristhiamtovar9003
    @cristhiamtovar9003 Месяц назад +1

    Just the video I was asking for.:w

  • @yash1152
    @yash1152 15 дней назад +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  15 дней назад

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

    • @yash1152
      @yash1152 15 дней назад

      @@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 "_

  • @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

  • @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

  • @s0me1newithhand7s
    @s0me1newithhand7s Месяц назад +1

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

  • @DeadEyez1710
    @DeadEyez1710 Месяц назад +1

    Cinema

  • @3zRides
    @3zRides Месяц назад +1

    Lol just what I was looking for

  • @tommyb2467
    @tommyb2467 Месяц назад +1

    Thanks

  • @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 ?

  • @thechadbuddha
    @thechadbuddha Месяц назад +2

    tr00nix

  • @ARed11
    @ARed11 Месяц назад +1

    gud videuo tnks.

  • @juca8001
    @juca8001 10 дней назад +1

    Awesome. Could you share your dotfiles? Thanks.

    • @vimjoyer
      @vimjoyer  10 дней назад

      github.com/vimjoyer/nixconf

  • @quodsto
    @quodsto Месяц назад +2

    Hi

  • @intermarer9145
    @intermarer9145 Месяц назад +1

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

  • @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

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

  • @mrpro2264
    @mrpro2264 13 дней назад +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  13 дней назад

      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.

  • @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.

  • @simonlauer9379
    @simonlauer9379 Месяц назад +1

    can you make something on nix ld?

  • @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 7 дней назад

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

  • @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 🫶