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!
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.
1:44 the diff view by nvd will help a lot 4:255: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 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.
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 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?
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.
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
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)
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.
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.
@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' "
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.
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.
@@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/#
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.
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.
Thank you, awesome to See such small but nice improvements to NixOS
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
that thumbnail. will check the tool out the next time I procrastinate from developing
looks great. i needs it
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!
YES
nh is goated. I don't think I'd be able to use NixOS without it
Good things come in small packages - this is actually pretty awesome
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!
i was thinking of writing something like this myself, so it’s nice to know that someone else has already done it lol
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.
Yeah, I've seen flake parts, and definitely I'll make videos for it and disko
I'll try it out, seems good! Thank you!
Thanks, it looks a great tool for my workflow, nice video, keep it 🔥
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?
I don't think nh has that functionality, so you might need to make your own script
@@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.
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?
There might be some tool for it, but I'm not aware of any
This is so good, thanks Vimjoyer!
What am I supposed to put in ~/dotfiles? Just the flake or the entire /etc/nixos?
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?*
4:12 `nh clean all --keep 3`
@@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?
Instead of using ./../ you can declare a path in your flake like hostPath = (self + "/hosts") and then import with (hostPath + "/module-name.nix")
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.
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
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)
@@__viperML ah yeah i saw that issue earlier, would be cool if you could get that implemented :3
New vimjoyer video let’s gooooo
I use navi for things like this, other such useful tools are pet, espanso, buku. And fzf with shell integration enabled.
that's really cool, thanks for sharing!
this is life changing!
i was wondering why some people like declarative operating system, if you use nixos could you help me answer that question?
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.
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.
this good shit
Nice I will try out this tool after work.
Looks fantastic.
@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' "
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.
Damn that colored output actually hard af.
I noticed that "nh clean all" does a better job than "nix store gc --debug" . Can nh also clear root?
Keep em coming Vim,
I was just thinking about writing some shell scripts to do this
Great video as always!
Perfect. This is exactly what I needed.
amazing
Привет из России, спасибо что рассказываешь о nixos
Thx, comfy 😊
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.
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
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.
@@vimjoyer right, I like the toold you mentioned nud I think, I will absolutely try it sometime
@@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/#
nh rocks.
this is so cool
"makes working with specializations quite a bit more pleasant" ok but like how exactly?
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.
I have just peed in my pants with joy 😂😂😂
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.
Sure, but I had to mention that it got a bit shorter because it's a helper program.
Awesome. A shame nh is not in stable yet.
Don't the nh clean command deletes the generations from the boot menu
It does 👍.
@@vimjoyer I tried "nh clean all --keep 3 --dry" and its still visible in the boot menu
First
Bahaha
WOW!!! OMG!!! AMAZING!!! I'M REAL HUMAN FR FR!!! SOMEBODY HELP!!! RESCUE ME!!!
Hello btw im too use nix os
thank you for your videos I love them
AFAIK the option "programs.nh.enable" is only available on the unstable channle yet
You the BEST