Nix derivations explained | Unleash the full potential of NixOS

  Рет қаралды 13,472

Vimjoyer

Vimjoyer

Күн бұрын

Discord server: / discord
All code from the video: github.com/vim...

Пікірлер: 56
@unknown-otter
@unknown-otter Жыл бұрын
Another comment just for the yt algorithm! Thank you for your work!
@vimjoyer
@vimjoyer Жыл бұрын
Thanks!
@unknown-otter
@unknown-otter Жыл бұрын
Pardon me, I'm just curious, are you from CIS countries? Your accent sounds familiar to me (well, I'm from Russia)
@vimjoyer
@vimjoyer Жыл бұрын
@@unknown-otter I'm from Ukraine
@yash1152
@yash1152 Ай бұрын
1:44 _"there are also buncha optional keys"_ 1:58 it would be awesome if u showed the documentation before showing the demonstration. the experience with documentation for nix-pkgs (super frustrating) is exact opposite of xp with nixos-config (very good and smooth). so, showing the documentation/reference and _how_ to follow or _to which part_ of documentation's structure to pay attention to, would help new users a lotttt.
@yash1152
@yash1152 Ай бұрын
before or alongside showing the demonstration
@johannesCmayer
@johannesCmayer 6 ай бұрын
You forgot to add this to the nix playlist iirc.
@vimjoyer
@vimjoyer 6 ай бұрын
Done, thanks
@MARKHENSTROM
@MARKHENSTROM Жыл бұрын
Is there an algorithm that will make the end-user not spend copious amounts of time clicking cat-related videos on KZbin - thereby ruining my productivity?
@vimjoyer
@vimjoyer Жыл бұрын
If you find one, tell me).
@sachinchaudhary1310
@sachinchaudhary1310 7 ай бұрын
b;eh comment just for the algorithm baba bleh
@hotdog2c
@hotdog2c Жыл бұрын
Awesome explanation! loving the nix videos!
@yash1152
@yash1152 Ай бұрын
0:39 - 1:23 holly molly, just like that he covered ALLL THE THREE/FOUR syntax in a smooth seamless story manner. thanks a lotttt for this. 1. minimal/direct nix expression 2. nix function expression 3. importing [2.] in flake 4. embedding this inside a standalone flake
@wojciech-kulik
@wojciech-kulik 8 күн бұрын
I think you provide the most valuable and smooth content about Nix! Your videos helped me a lot!
@Gaivs
@Gaivs Жыл бұрын
I'm so glad I found this channel, great explanations for something I know I've wanted to learn for a long time!
@_modiX
@_modiX Жыл бұрын
I'm so happy for that as well. The documentation is vast, but shallow, with many sources to learn from. It's nice to have someone condense all the necessary information to get learn how to do specific things with very easy examples.
@lamprospitsillou6325
@lamprospitsillou6325 Жыл бұрын
I am running Nixos-install as we speak, keep up the amazing work , thank you!
@mr.tm-yt
@mr.tm-yt Жыл бұрын
Great video as always
@dillon4248
@dillon4248 Жыл бұрын
Awesome! Still working on getting use to nix to switch to it as my daily driver. Really interested in seeing more on how to build projects and push to the nix package manager for my own projects and projects I find that are not in the nix package manager yet
@BartekBroniszewski
@BartekBroniszewski Жыл бұрын
Awesome as always! It is like Nix inception, you wrap your binary in a wrapper of a wrapper...yes and then we have cowsay. I totally got it.
@vimjoyer
@vimjoyer Жыл бұрын
Haha, yes.
@DooMWhite
@DooMWhite 3 ай бұрын
Amazing content, just what I wanted to understand.
@DooMWhite
@DooMWhite 3 ай бұрын
Just a thing, I tried using cp $src/hello-world, but that didn't work, cuz cp needed "" in the source part, how do I fix that? I tried using "$src/hello-world" and "${src}/hello-world", but that wouldn't work.
@infernocop31
@infernocop31 Жыл бұрын
You are incredible. Keep it up
@yash1152
@yash1152 Ай бұрын
3:37 hi again. when to use the devShells.${system}.default vs packages.${system}.default? i mean, the devShell _has_ to be defined * for tools like debugger, linter, lang-servers, etc... * regardless of whether the package is built with manual make runs, or via nix build. so, what's the benefit of defining the "package" when doing iterative rapid development for learning the programming concepts (i.e. not in a hardcore project)? i have no problem defining even both, but i want to properly know the rationale behind. this may sound dumb, but i kinda can't see clearly.
@AppsTricksByNazakatUmrani
@AppsTricksByNazakatUmrani 3 ай бұрын
ManI love what you are doing for the community, no one can thank you enough for your work, I don't know what to say
@DooMWhite
@DooMWhite 2 ай бұрын
I tried splitting the default.nix to 3 files, one for each case, but for some reason, I get an error that those files don't exist, only default.nix works, do you know why?
@vimjoyer
@vimjoyer 2 ай бұрын
If you are using git, make sure to git add them. Flakes don't see unstaged files.
@DooMWhite
@DooMWhite 2 ай бұрын
@@vimjoyer That was the issue, ty!
@yash1152
@yash1152 Ай бұрын
0:49 hi! what does those curly braces {} between import and semicolon ; convey? i had to put "pkgs" at this place while importing my nix-file containing packages array. i.e. "let mp = import ./my-pkgs.nix pkgs; in ..." but i dont understand what part of syntax this is. or say, what the "pkgs" or curly braces is doing here.
@sailendragautam3736
@sailendragautam3736 23 күн бұрын
Is there a way to use sudo inside the nix-shell -pure ? Even after having the package sudo would throw some errors
@MiaLovesRod
@MiaLovesRod Жыл бұрын
LETS GOOO
@rotteegher39
@rotteegher39 Жыл бұрын
What about you rename your channel to nixjoyer instead of vimjoyer ? xD
@vimjoyer
@vimjoyer Жыл бұрын
I'd have to change avatar too
@rotteegher39
@rotteegher39 Жыл бұрын
why not then @@vimjoyer
@vimjoyer
@vimjoyer Жыл бұрын
@@rotteegher39 I don't care about the name much, but some people like this one, and I wont just be making nix videos here.
@rotteegher39
@rotteegher39 Жыл бұрын
respect +++ @@vimjoyer
@yash1152
@yash1152 Ай бұрын
2:47 > _"to be explicit, we could also like $src/hw"_ 3:10 > _"if u dont specify a build phase, nix will attempt to use a Makefile from src dir"_ 4:26 > _"we can define our own list [phases] containing phase names, for easy learning derovations"_ ohw, niice. yeah, it makes much more sense in explicit manner while getting started.
@yash1152
@yash1152 Ай бұрын
3:10 _"if u dont specify a build phase, nix will attempt to use a Makefile from src dir"_ awesommme. super helpful for those of us beginners who like to use makefiles for easy understanding/overview & also compatibility with IDEs & editors etc.
@yash1152
@yash1152 Ай бұрын
4:09 > _"we could put it in buildInputs, but better is nativeBuildInputs; to make it available in phases, not in runtime"_ umh, whatt? isnt the cowsay used in the program itself? so i'd think it would be required at runtime too no? i think it is smth like dynamic linking to a system path executable. but can u please expand on it?
@yash1152
@yash1152 Ай бұрын
3:56 ...
@sharperguy
@sharperguy 5 ай бұрын
Why do you import default.nix rather than using callPackage?
@vimjoyer
@vimjoyer 5 ай бұрын
Yeah, callPackage is preferred.
@MrPielover19
@MrPielover19 Жыл бұрын
hype
@fulsomenko
@fulsomenko Жыл бұрын
great stuff
@zperk13
@zperk13 4 ай бұрын
How does it know what g++ is? Why did you not have to define it in the buildInputs or i guess the nativeBuildInputs
@matthias2447
@matthias2447 Ай бұрын
mkDerivation wraps around the derivation function and provides common utilities such as g++. The build is executed in a sandboxed environment, where g++ is enclosed via mkDerivation.
@alexanderleschanz9991
@alexanderleschanz9991 Күн бұрын
my question too @Vimjoyer
@SantiagoFraire
@SantiagoFraire Жыл бұрын
How does nix know which commands to run from the Makefile?
@vimjoyer
@vimjoyer Жыл бұрын
you can find all the logic here: github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/make-derivation.nix.
@evgen4681
@evgen4681 Жыл бұрын
Спасибо за такие классные видео! Можешь, пожалуйста, рассказать про создание единого окружения разработки (как я понял, для этого используют nix develop или nix shell). Мой самый главный вопрос в том, что там по умолчанию используется bash, но я хотел бы использовать свой конфиг zsh (это уже не nix way?).
@vimjoyer
@vimjoyer Жыл бұрын
Да, я планирую сделать видео про Nix shell & Nix develop, а запускать их с zsh совсем несложно. Там можно указать shell-hook, который запустит нужную программу, включая любые оболочки. Так как по умолчанию все переменные из окружения пользователя сохряняются при входе в nix shell, .zshrc тоже будет там работать.
@dillon4248
@dillon4248 Жыл бұрын
Also interested in nix develop for my projects (:
@_modiX
@_modiX Жыл бұрын
I've seen some packages coming with a flake.nix in their repository. Could you please show in a video how to have a project with a flake.nix instead and how it is properly consumed on my own flake.nix? You are a good teacher btw. :)
Ultimate Nix Flakes Guide
17:08
Vimjoyer
Рет қаралды 22 М.
WORLD BEST MAGIC SECRETS
00:50
MasomkaMagic
Рет қаралды 54 МЛН
Nix and NeoVim
13:38
ThePrimeTime
Рет қаралды 142 М.
NixOS Has One BIG Problem
17:48
The Linux Cast
Рет қаралды 71 М.
Nix explained from the ground up
23:39
Surma
Рет қаралды 33 М.
Why Nix and NixOS is great (for developers)
9:20
J. J. Bigorra
Рет қаралды 404
Nix flakes explained
7:22
Vimjoyer
Рет қаралды 79 М.
Nix Language Explained
8:54
Vimjoyer
Рет қаралды 18 М.
NixOS is Mindblowing
12:02
Chris Titus Tech
Рет қаралды 706 М.
Modularize NixOS and Home Manager | Great Practices
8:07
Vimjoyer
Рет қаралды 25 М.
Matthew Croughan - Use flake.nix, not Dockerfile - MCH2022
17:25
Matthew Croughan
Рет қаралды 48 М.