This Program Will Make Your Nix Experience Comfy | NH The Nix Helper

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

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

  • @matthiasbendewald1803
    @matthiasbendewald1803 6 หลายเดือนก่อน +23

    Thank you, awesome to See such small but nice improvements to NixOS

  • @einargs
    @einargs 6 หลายเดือนก่อน +7

    This looks awesome! The clean part sounds really useful, and it'll be nice to replace the handful of bash scripts i have for updating my config

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

    that thumbnail. will check the tool out the next time I procrastinate from developing
    looks great. i needs it

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

    I am a new (and very happy) NixOS user. Your videos are really great! Thank you for your amazing work! Off to configure nh rn! Cheers!

  • @deviantsemicolon618
    @deviantsemicolon618 6 หลายเดือนก่อน +10

    YES
    nh is goated. I don't think I'd be able to use NixOS without it

  • @TheMotorcycleBoy-pe2eg
    @TheMotorcycleBoy-pe2eg 5 หลายเดือนก่อน +4

    Good things come in small packages - this is actually pretty awesome

  • @Ifæn21
    @Ifæn21 6 หลายเดือนก่อน +2

    If it weren't for you, probably most of us wouldn't have stick out with NixOS because sometimes is hard to start, but these tools you show us really, or at least for me, made us fall in love with this distribution. Always looking forward to your videos man!

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

    i was thinking of writing something like this myself, so it’s nice to know that someone else has already done it lol

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

    Have you seen flake-parts, or specifically the nixos-flake template from flake-parts? I've been strugginling with it for some time now, a tutorial video would help a lot! It provides some "nix run .#" targets similar to the ones showcased in the video, although definitely not as powerful.
    Oh, and will there be a tutorial on disko coming? I mean a tutorial on how to make a flake configuration that you can immediately install without any manual setup (aka partitioning) straight from the livecd.

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

      Yeah, I've seen flake parts, and definitely I'll make videos for it and disko

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

    I'll try it out, seems good! Thank you!

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

    Thanks, it looks a great tool for my workflow, nice video, keep it 🔥

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

    1:44 the diff view by nvd will help a lot
    4:25 5:09
    umh, how to run nh so as to show difference in packages in currently active profile, vs the one which _will_ be built by current config?

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

      I don't think nh has that functionality, so you might need to make your own script

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

      @@vimjoyer i don't remember which part of official doc of nvd i read, but some weird form of shell invocation involving (dollar at-rate symbols) of nvd directly allows to do that.

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

    hey so... this is not available for nix flakes commands right? like "nix develop" or "nix shell" etc..?
    do you know of any tool that do?

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

      There might be some tool for it, but I'm not aware of any

  • @barboza-dev
    @barboza-dev 6 หลายเดือนก่อน +1

    This is so good, thanks Vimjoyer!

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

    What am I supposed to put in ~/dotfiles? Just the flake or the entire /etc/nixos?

  • @sr.oskar_alhos
    @sr.oskar_alhos 5 หลายเดือนก่อน +1

    Hello, mate. I have been using NixOS since 17/05/24 and I already have 10 generations, but I want to just keep 3. So, my question is: *What file do I have to configure to that and what do I have to write there, please?*

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

      4:12 `nh clean all --keep 3`

    • @sr.oskar_alhos
      @sr.oskar_alhos 5 หลายเดือนก่อน

      @@vimjoyer Firstly: *THANK YOU!*
      Secondly: the command did now work. The answer is: *nh: command not found*
      So I tried to insert the command *nh* like you did in 0:45 *environment.systemPackages = with pkgs; [*
      *nh*
      *]*
      BUT an errors happened about the *nh* and I had to delete it from the file.
      Is there no other way, Vim?

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

    Instead of using ./../ you can declare a path in your flake like hostPath = (self + "/hosts") and then import with (hostPath + "/module-name.nix")

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

    3:30 storing the specialisation names in etc slash specialisation file; for ease of referring them.
    all this makes much sense now that i am watching this after switching to nixos.
    i watched this vid several months ago, i.e. before the switch to nixos; and i had got a bit scared lol.
    anyhow... yeah, learn the vanilla things first. the helpers come only later.

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

    i can't use nh because i rely on nixos-rebuild's build-host and target-host options (which nh doesn't seem to support) for managing my server, but thanks for introducing me to nix-output-monitor! seems really neat and i added it to my nixos-rebuild wrapper script

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

      I plan to implement that at some point, but haven't had the time to do that. There's a github issue for it (not posting links because youtube kills comments with links)

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

      @@__viperML ah yeah i saw that issue earlier, would be cool if you could get that implemented :3

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

    New vimjoyer video let’s gooooo

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

    I use navi for things like this, other such useful tools are pet, espanso, buku. And fzf with shell integration enabled.

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

    that's really cool, thanks for sharing!

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

    this is life changing!

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

    i was wondering why some people like declarative operating system, if you use nixos could you help me answer that question?

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

      I don't have to worry about breaking it because I can just revert any changes. This gives me the freedom to experiment, and I can always be sure that my system will work when I need it. It's also super easy to just install all my custom configs with one command, and sync them between machines.

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

      Reproducibility is a big one. Ever install a new Arch system and then have to install all of your normal apps, configure them or install all your dotfiles, themes, etc?
      With Nix this doesn't have to be a thing. As you use your computer, you slowly make it to your liking, and then you can simply copy your config file to a brand new system and apply all of your modifications.

  • @arkoprovoshaw5737
    @arkoprovoshaw5737 6 หลายเดือนก่อน +6

    this good shit

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

    Nice I will try out this tool after work.

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

    Looks fantastic.

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

    @0:52 after making changes to configuration.nix and running "nix flake update" and "sudo nixos-rebuild switch --flake ."
    im getting "error: undefined variable 'nh' "

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

      nh is only available on the unstable branch of nixpkgs right now, so you might be using stable.
      If you don't want to switch to unstable, you can take this one package from unstable or nh's GitHub repo with a flake input.

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

    Damn that colored output actually hard af.

  • @TheMotorcycleBoy-pe2eg
    @TheMotorcycleBoy-pe2eg 4 หลายเดือนก่อน

    I noticed that "nh clean all" does a better job than "nix store gc --debug" . Can nh also clear root?

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

    Keep em coming Vim,

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

    I was just thinking about writing some shell scripts to do this

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

    Great video as always!

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

    Perfect. This is exactly what I needed.

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

    amazing

  • @0xTheDad
    @0xTheDad 5 หลายเดือนก่อน +1

    Привет из России, спасибо что рассказываешь о nixos

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

    Thx, comfy 😊

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

    I always discover a cool tool and then a week later you make a video on it 😢 I guess that’s good in a way but I wish I got more cool discovery, still enjoy watching your videos though.

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

    Why do we need thus nh, when we can just create a alias for the command like I have done, ns does this for me

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

      You can create your own alias, or you can use nh. It's simply a matter of preference. I don't want to come up with aliases, so I am using nh.

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

      @@vimjoyer right, I like the toold you mentioned nud I think, I will absolutely try it sometime

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

      ​@@vimjoyer I saw this video once again and turns out, I need to use nh 😂, because I need these progress bars and beautiful UI for rebuilds as well, I will still us my alias but now that alias will point to nh os switch command not nixos rebuild switch --flake destination/#

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

    nh rocks.

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

    this is so cool

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

    "makes working with specializations quite a bit more pleasant" ok but like how exactly?

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

      It runs correct activation script by detecting current running specialization. Meaning you will stay on current active specialization after a rebuild without having to explicitly write it's name in the command.

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

    I have just peed in my pants with joy 😂😂😂

  • @delightful-ish
    @delightful-ish 6 หลายเดือนก่อน +3

    using the exact same number of words to run an update does not seem like an improvement worth learning a third party tool. Telling you what was actually changed seems like a good feature that it's kinda crazy the default tools don't do.

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

      Sure, but I had to mention that it got a bit shorter because it's a helper program.

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

    Awesome. A shame nh is not in stable yet.

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

    Don't the nh clean command deletes the generations from the boot menu

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

      It does 👍.

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

      @@vimjoyer I tried "nh clean all --keep 3 --dry" and its still visible in the boot menu

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

    First

  • @berkano4617
    @berkano4617 6 หลายเดือนก่อน +5

    WOW!!! OMG!!! AMAZING!!! I'M REAL HUMAN FR FR!!! SOMEBODY HELP!!! RESCUE ME!!!

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

      Hello btw im too use nix os

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

    thank you for your videos I love them

  • @thisisme-u9j
    @thisisme-u9j 5 หลายเดือนก่อน +1

    AFAIK the option "programs.nh.enable" is only available on the unstable channle yet

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

    You the BEST