Scripts In Any Language With Nix Writers | NixOS Builders & Writers

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 มิ.ย. 2024
  • 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.
    Discord server: / discord
    Donations: ko-fi.com/vimjoyer
    Nix writers in nixpkgs: github.com/NixOS/nixpkgs/blob...
    This video was sponsored by Brilliant.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 46

  • @vimjoyer
    @vimjoyer  หลายเดือนก่อน +8

    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.

  • @mixolydianmel
    @mixolydianmel หลายเดือนก่อน +36

    Honey, a new vimjoyer video just dropped, time to get even more esoteric about how you treat computing!

  • @vasilypustovoit4091
    @vasilypustovoit4091 หลายเดือนก่อน +32

    Yay, Vimjoyer got a sponsorship! Congrats!

    • @vimjoyer
      @vimjoyer  หลายเดือนก่อน +15

      Never thought this moment would come

  • @kernelpanic_init1
    @kernelpanic_init1 24 วันที่ผ่านมา +5

    Ordinary People: Nix doesn't have good documentation *crying intensifies*
    Vimjoyer: I am the documentation.

  • @angeldude101
    @angeldude101 หลายเดือนก่อน +12

    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.

  • @petrpechkurov3095
    @petrpechkurov3095 25 วันที่ผ่านมา +1

    God bless you, dear Vimjoyer for this treesitter highlight thing!!

  • @fernandoalex.
    @fernandoalex. หลายเดือนก่อน +10

    One of my fav channels at the moment. Keep up the great work.

  • @GrossGeneralization
    @GrossGeneralization 5 วันที่ผ่านมา +1

    "your favourite language... lua"

  • @liesdamnlies3372
    @liesdamnlies3372 หลายเดือนก่อน +17

    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…

    • @vimjoyer
      @vimjoyer  หลายเดือนก่อน +4

      haha, you are welcome

    • @acobster
      @acobster หลายเดือนก่อน

      dooo itttt

  • @scytheluna
    @scytheluna หลายเดือนก่อน +14

    omg i just switched to nix last night and im greeted by a new vimjoyer video! excited to continue learning!!

    • @lexsaito1189
      @lexsaito1189 หลายเดือนก่อน +1

      What DE are you using?

    • @scytheluna
      @scytheluna หลายเดือนก่อน

      @@lexsaito1189 kde plasma

    • @scytheluna
      @scytheluna หลายเดือนก่อน

      @@lexsaito1189 im using kde

  • @samantony4423
    @samantony4423 22 วันที่ผ่านมา +1

    Brilliant sponsorship let's goooooo!!

    • @vimjoyer
      @vimjoyer  22 วันที่ผ่านมา

      Hell yeah

  • @aloneer0529
    @aloneer0529 หลายเดือนก่อน +2

    Great video as always!

  • @Raftzard
    @Raftzard 21 วันที่ผ่านมา +1

    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!

  • @0nyr
    @0nyr หลายเดือนก่อน +2

    Awesome !

  • @emilnordgard5228
    @emilnordgard5228 หลายเดือนก่อน +3

    YOOO SPONSORED!

  • @mkuznetsoff
    @mkuznetsoff หลายเดือนก่อน +3

    Дякую!

  • @YannMetalhead
    @YannMetalhead 9 วันที่ผ่านมา +1

    Good video.

  • @user-xd5gd4pc9h
    @user-xd5gd4pc9h หลายเดือนก่อน +2

    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!

    • @vimjoyer
      @vimjoyer  หลายเดือนก่อน

      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.

    • @vaisakhkm783
      @vaisakhkm783 หลายเดือนก่อน

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

  • @timonteutelink6994
    @timonteutelink6994 14 วันที่ผ่านมา

    Is there any way to use writeRustBin using tokio and other rust libraries?

  • @THEMithrandir09
    @THEMithrandir09 หลายเดือนก่อน +3

    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.

    • @vimjoyer
      @vimjoyer  หลายเดือนก่อน +1

      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.

    • @THEMithrandir09
      @THEMithrandir09 หลายเดือนก่อน +1

      @@vimjoyer True. It clearly is very useful and a great option to know about :)

  • @geryz7549
    @geryz7549 หลายเดือนก่อน +2

    Does inline language highlighting work in Emacs Nix-mode?

    • @vimjoyer
      @vimjoyer  หลายเดือนก่อน +1

      It's built into Nix Treesitter grammar, so yeah, it should

  • @nathanp3366
    @nathanp3366 หลายเดือนก่อน +2

    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.

    • @amargasaurus5337
      @amargasaurus5337 หลายเดือนก่อน +1

      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.

    • @vimjoyer
      @vimjoyer  หลายเดือนก่อน +2

      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 👍

    • @dinihtis
      @dinihtis หลายเดือนก่อน +1

      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 :)

  • @TheNathan724
    @TheNathan724 หลายเดือนก่อน +1

    can you provide a simple example of using writeShellApplication and using them without adding it to the systemPackages ?

    • @vimjoyer
      @vimjoyer  หลายเดือนก่อน

      Wrap it with parentheses, and use it like any other nix package

  • @user-to9hv8tp5k
    @user-to9hv8tp5k หลายเดือนก่อน +2

    If you enjoy this video

  • @kfove7347
    @kfove7347 27 วันที่ผ่านมา +1

    how about push video about devenv witch a good tool for setup env with nix

    • @vimjoyer
      @vimjoyer  27 วันที่ผ่านมา

      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

  • @M11K3AS
    @M11K3AS หลายเดือนก่อน +3

    cargo install cargo-mommy

    • @M11K3AS
      @M11K3AS หลายเดือนก่อน +2

      my bad this is not kitty