Scripts In Any Language With Nix Writers | NixOS Builders & Writers
HTML-код
- Опубликовано: 11 сен 2024
- To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/.... You’ll also get 20% off an annual premium subscription.
Discord server: / discord
Donations: ko-fi.com/vimj...
Nix writers in nixpkgs: github.com/Nix...
This video was sponsored by Brilliant.
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.
Honey, a new vimjoyer video just dropped, time to get even more esoteric about how you treat computing!
Ordinary People: Nix doesn't have good documentation *crying intensifies*
Vimjoyer: I am the documentation.
Nix can also make C and Haskell "scripts", and yes, it's so cool that you can use compiled languages as though they were shell scripts. Honestly makes me want to try replacing NixOS's stage 1 init bash script with a statically compiled binary.
Yay, Vimjoyer got a sponsorship! Congrats!
Never thought this moment would come
One of my fav channels at the moment. Keep up the great work.
omg i just switched to nix last night and im greeted by a new vimjoyer video! excited to continue learning!!
What DE are you using?
@@lexsaito1189 kde plasma
@@lexsaito1189 im using kde
@@lexsaito1189 im currently using kde 6.1 :)
I was wondering how I was gonna deal with my mess of scripts…and now I wanna not just put them in Nix but rewrite them in Rust just because…
haha, you are welcome
dooo itttt
God bless you, dear Vimjoyer for this treesitter highlight thing!!
"your favourite language... lua"
Great video as always!
Hey may I request a video about the overview of that awesome config you presented us with a few months ago? Even a updated version of that awesome config, you all your brilliant config ideas in it, so we can learn from it. Gratz and thx once more!
Brilliant sponsorship let's goooooo!!
Hell yeah
Awesome !
Дякую!
YOOO SPONSORED!
2 quick questions: 1. What if using zsh in stead of bash when using WriteShellApplication? Thank you! 2. Can define shell env be used repeately? Or using other method such as devbox, conda or even in container? Thank you twice!
writeShellScriptBin uses bash, but you can create your own writer that uses Zsh instead.
I didn't quite get your second question, but if you want to create a dev shell with packages and environment variables, you can use regular nix shells or devenv. They can be used as many times as you want.
@@vimjoyer 2nd q, atleast i assume is, whether we can use writers to replace simple tools or bashscripts we have in a project within a dev environments..
also i have a question, in your april fools video, it seemed like you are saying using nix shell nixpkgs\#python312 everytime getting a shell is dumb... i normally don't globally install any langs, but just do that... so i can have difference version on the spot.. is it a bad idea? is there any better way ?
Good video.
Even if the tooling for this exists now, I just don't see the appeal of embedding code from one language in another, especially if that code represents a standalone script or application. I'd much rather handle my scripts like a package in one or more git repos and specify their dependencies how to build them in nix. This way people/systems not using nix can more easily use them.
Sure, but this can be useful for writing small scripts. Sometimes you don't want to write a small script in bash, but you also don't want to start a whole project.
@@vimjoyer True. It clearly is very useful and a great option to know about :)
Is there any way to use writeRustBin using tokio and other rust libraries?
Your videos get me really excited to try nixos, then I boot into my nixos vm, try to do something and hate it. I love the concept and I will stay subscribed but it seems like I am just too much of a dum dum to put these tutorials into action.
I've been daily driving it for months and I still can't replicate most tutorials
funcional programming is hard, but even so i sure don't regret spending a full week to set up my system.
I'd always screw myself by dependency helling my system into oblivion and NixOS got rid of that!
I even managed to setup a custom derivation that builds the game I mod for from source, and with an alias to a short bash script I can update it to the latest git commit in one word, then rebuild and shablam! NixOS does all the compiling for me.
Don't worry, when I initially started with NixOS, I also dropped it almost immediately. You don't have to force yourself to use it, and it's not going to run away from you.
Just wait until you have plenty of free time and motivation, and then try again 👍
Personally I use bare-bones configuration, just to keep myself and my laptop sane and do not worry about re-creating setup if something will eventually go wrong. For now I do not use more advanced features at all, just enjoying working system :)
can you provide a simple example of using writeShellApplication and using them without adding it to the systemPackages ?
Wrap it with parentheses, and use it like any other nix package
Does inline language highlighting work in Emacs Nix-mode?
It's built into Nix Treesitter grammar, so yeah, it should
If you enjoy this video
how about push video about devenv witch a good tool for setup env with nix
I am using devenv quite a lot, and I do want to make a video about it, but I first want to wait until the rust rewrite gets a bit more features
cargo install cargo-mommy
my bad this is not kitty