Get Exclusive NordVPN deal + 4 months extra here → nordvpn.com/vimjoyer It’s risk-free with Nord’s 30-day money-back guarantee!
@CatholicDavid-o1i11 күн бұрын
Nord VPN is not 0 logs and is not anonymous. Just fine if you don't care about privacy, and want your favorite netflix show.
@leadr_11 күн бұрын
NordVPN is bad
@SanjaByelkin10 күн бұрын
The problem is that nix os is not supported by nordvpn, actually it is why I didn't switch to nix.
@Folvin-x1o11 күн бұрын
Important addition - Jumping into NixOs as your FIRST linux distro after using Windows for years.
@Nothing-f8z11 күн бұрын
THATS ME!!!! I also have no coding experience either so its definitely a experience
@Aimnos11 күн бұрын
This is what I did, but I learned how to use Linux well before that with WSL. First, with Ubuntu LTS (the default for WSL); and then switching to nixos-wsl. Can't say the transition went without any hitches (especially since I tried jumping into Hyprland almost immediately lol), but I managed to familiarize myself with everything and feel reasonably comfortable with NixOS after just a couple of months.
@tobeqz706511 күн бұрын
@@Nothing-f8zNow im curious how you even found out about it lol
@Sw3d15h_F1s411 күн бұрын
I did that as well and honestly I'm having less issues on nixos than on windows
@ZacMagee11 күн бұрын
Balls deep. No better way.
@Jdizzle11111 күн бұрын
A really nice feature of nix flakes which is ultimately what helped me finally understand is that u can start out with a really really minimal flake and just have it track nixpkgs and then essentially leave it alone until you are ready! It really helped me learn flakes by just having a basic one in my configuration repo. Flakes seemed super complicated but having them present and doing something that I could then adjust at my leisure made them fat easier to understand than if I had started without flakes and added them later
@vimjoyer11 күн бұрын
True, the most basic configuration is basically the same for everyone
@drako-11711 күн бұрын
Another good tip that I just learned recently is rebuilding using 'test' when testing new configurations, instead of using 'switch', which pushes new configurations to the bootloader immediately.
@TheOnlyGhxst11 күн бұрын
Though, as I've personally learned, always using switch CAN be educational when you fully brick your system and have to learn how to fix it from a LiveUSB so you can boot in again lol
@deidyomega8 күн бұрын
@@TheOnlyGhxst "Your going to learn today" lol
@con-f-use11 күн бұрын
More common beginner mistakes: - Adding a new file to a git version controlled flake and forgetting to `git add` it - Using LD_LIBRARY_PATH as a cure-all - Not learning the nix-language and the basics of the module system properly and then essentially doing a random-walk to a working config every time they change something - Copying someone else's config or large parts of it without fully understanding it and then being complete lost when something doesn't work - Using `--impure` - Using too many tools and dependencies like disko, nh, colmena, flake-parts, lix, nix-super, home-manager, nix-vim, sylix and everything else under the sun before they got comfortable with the basic nix functionality - Using nix just because of hype, not because of an actual need for its strong suits
@vimjoyer11 күн бұрын
Facts
@5mrd8 күн бұрын
What would be the alternative for "sudo nixos-rebuild switch --flake ~/nixos-config --impure"? Is it even possible without "-impure"?
@con-f-use7 күн бұрын
@@5mrd Is what even possible? You don't give enough information. It's not the command itself that requires impurity. It's what's in your configuration. Impurities can almost always be avoided, by not referencing stuff in your config that's outside the flake. With --impure, you might as well not be using nix at all, because reproducibility goes out the window it's the whole point of nix.
@bastiana36112 күн бұрын
I am so glad that I started out using flakes, it's such a quality of life feature, especially because of the shareability of your configs. Great video as usual, keep it up!
@TheOnlyGhxst10 күн бұрын
Never heard of the `nh` utility until this video, I may start using it on my system, thanks for the new info!
@vimjoyer10 күн бұрын
I also have a video about it - kzbin.info/www/bejne/ep-kZauEidelp7s
@TheZonni11 күн бұрын
Good practice is to commit after every successful rebuild, it saved me a lot of headaches, my beginner mistake I recall is garbage collecting only nix generations, but not home-manager generations
@infinitivez10 күн бұрын
Ty! I'm just starting to learn Nix, and it's good to know what to avoid, and best practices. Your vids have been my diving board.
@terryd0g7 күн бұрын
1) 1:30 Not using a version control/backup of your configuration 2) 2:10 Not understanding difference between rebuild, updates, rollbacks 3) 3:00 Not garbage collecting old packages 4) 3:35 Neglecting declarative features of Nix & using nix-env or nix profile Bonus) 5:15 not splitting config multiple files/modules 5) 5:45 Trying to learn everything at once/explore everything 6) 7:05 Assuming non-FHS compliance will render system unusable
@mastermach5011 күн бұрын
Bonus mistake for dualbooters: The default boot partition created by Windows is only meant to fit Windows. If you are dualbooting NixOS and Windows (and installed Windows first) make sure to expand the boot partition. Otherwise you can easily run out of space in the boot partition, which inturn stops you from making a new build. (This can be fixed but it's better to just make a bigger boot partition while installing than suffer a headache)
@tobeqz706511 күн бұрын
Ugh yes I ran into this with Ubuntu when I first used linux. Crazy thing is that no "dual boot install guide" even mentioned it!
@TheOnlyGhxst10 күн бұрын
dealt with this recently, the bright side is that I learned how to clone the boot partition, create a new boot partition, and restore the data, WITHOUT breaking either OS on the dual boot setup. It could be useful info to know for the future. Personally I think making mistakes like this are an important part of the education process, after all the saying goes: "You learn more through failure than you do from success."
@dimashadziq600710 күн бұрын
Thx i plan to learn nix in near future, i m 2 years experienced arch user, from what i read nix have advantage over my usecase for work and i m exited to learn it next week
@vimjoyer10 күн бұрын
Wish you luck
@PanTek-r8g2 күн бұрын
do it...Ryan Lim has an excellent guide
@pao_lumu11 күн бұрын
I started daily driving NixOS after fiddling with it a bit for a month or two. It has been an absolute joy to use, and I absolutely agree with all these noob traps.
@GALONE711 күн бұрын
I don't like to have a scheduled garbage collection task to kick in unexpectedly. I'm using nix.settings = {min-free = 1 * 1024 * 1024 * 1024; max-free = 50 * 1024 * 1024 * 1024;} for the GC to be activated during the build. So, I had totally forgotten the nix disc usage issues until now that I'm watching this video.
@vimjoyer11 күн бұрын
⬆⬆⬆
@ChrisLincoln3 күн бұрын
So I saw a video on Hyprland and wanted to try it out. It officially only supports 3 distros and I had never heard of NixOS, so I looked into it. I'm still very new to the OS, but I really love how it works. I'm hoping to build a decent desktop this year, and with NixOS I should be able to just copy a config file to the new machine and be more or less up and running in the same environment.
@throwaway98059 күн бұрын
I was so anxious watching this because I was like "when is he going to say something that I do." Thankfully your tips aren't too strict XD
@SpidFightFR10 күн бұрын
Honestly for the fhs part, 'specialy the scripts. I had *problems* (skill issues mostly) because i wrote a fair amount of scripts that did a bunch of things... they were broken by default on nixos, but honestly, barely changing the shebang solves everything. Except of specifying /usr/bin/ you specify the path to nix-shell, and the interpreter you wanna use. It's a piece of cake. I use conky as well, with sensors all over th place, same thing, not only did i found my way cuz nixos is well made, i even managed to nixify the config. Which i'm happy with. Switching to nixos is cool, there are no cheats or tricks. If it worked yesterday, it works today, and it will work tomorrow.
@9alexua911 күн бұрын
One more addition - using nixos first time not in virtual machine. This will really smooth adoption of it and after you're ready - you can just copy configuration.nix file to bare metal
@angeldude10110 күн бұрын
I honestly suggest using home-manager on an existing linux system over installing NixOS. It works the same way, so you can learn the same principles, but it can't break your core system if you do something stupid because it's limited to your home directory. (NixOS does very it very hard to permanently break your core system, but that's really only after it's already installed and you have a trusted fallback generation.) And the best part is that everything you do in home-manager can be copied over wholesale if you eventually make the jump to a full NixOS system.
@fizipcfx10 күн бұрын
maybe i am just operating differently but, i literally just deleted arch and installed nixos without knowing much. and then just immediately tracked my config with git. and started working on one thing at a time. how to add a package. how to configure this small thing in firefox. how to transfer my dotfiles. how to use devshells. in one week i had an fully "operational" config. far from desired shape but it is approaching it and i am learning. i love it actually. i even maintain 2 packages in nixpkgs now. if i couldnt crack it in a week i had to go back to arch to work on my dayjob
@blackmine5711 күн бұрын
Hello! Just found out your channel, and I want to thank you, really ! Another guy in the comment said we shouldn't declare absolutely everything and it's fine to setup things like flatpak. So, since I'm a dummy, I was wondering if you could once make a video about installing flatpak declaratively on user profile (so with home manager). I followed your home manager video but I didn't found out how the hell I can declare flatpak. (Sure installing flatpak as system packages is easier, but where's the fun in that?)
@vimjoyer11 күн бұрын
There are several repos that allow you to install flatpak packages declaratively, like github.com/gmodena/nix-flatpak, github.com/GermanBread/declarative-flatpak or github.com/yawnt/declarative-nix-flatpak, but from my experience, they don't work that well, so I am not using any of them. I may make a video about one of them later though 👍
@blackmine578 күн бұрын
@@vimjoyer Thank you :) It doesn't work very well for me neither, I thought it was because I didn't know how it worked
@moenchbohne11 күн бұрын
I am really glad to see that I am 5 months into Nixos and avoided all these mistakes 😅, but question to the community: how the heck do i customize sddm with themes? I read so much contradicting shit and nothing works for me. So what do you recommend?
@Space__man114911 күн бұрын
+1
@gabbieblue11 күн бұрын
i use stylix to theme everything, and i think theyre working on support for plasma at the moment which would include sddm. something to keep an eye on for the future! if youre using sddm with something other than plasma, i recommend not doing that
@vaisakh_km11 күн бұрын
Ikr... it's a nightmare.. i am using nix for 1.5y... still no fing clue how to fix that
@Anonymous404511 күн бұрын
I just do it from plasma settings ngl. I'd guess that shows up in plasma-manager somewhere if you want to dig into that for it to be declarative.
@theneekofficial882910 күн бұрын
@@gabbieblue wdum? sddm w/o plasma works fine. I use it with hyprland. Also here: { pkgs, inputs, ... }: { environment.systemPackages = with pkgs; [ catppuccin-sddm (pkgs.catppuccin-sddm.override { flavor = "mocha"; font = "JetBrains Mono"; fontSize = "9"; background = "${inputs.wallpapers.wallpapers.path}/nixos-wallpaper-catppuccin-mocha.png"; loginBackground = true; }) catppuccin-sddm-corners ]; services.displayManager.sddm = { enable = true; wayland.enable = true; theme = "catppuccin-mocha"; # theme = "catppuccin-sddm-corners"; package = pkgs.kdePackages.sddm; }; } That's how I've done it.
@Alchemist_Prime2043 күн бұрын
Please make a complete tutorial of installation and ricing plz
@ZeStig9 күн бұрын
Wonderful. Just as I was contemplating on giving NixOS another shot on my machine.
@PanTek-r8g2 күн бұрын
do it
@ZeStig2 күн бұрын
@@PanTek-r8g I switched the day before yesterday
@sosiskaschannel705210 күн бұрын
I used fhs env to run War Thunder 😅 It works fine btw, but no scaling, and no vsync in hyprland. So I use gnome for it
@niksingh71011 күн бұрын
I would love to have a vid of FHS as i discovered it a few days ago.
@maxarendorff652111 күн бұрын
Another mistake: Thinking you need to declaratively configure ALL THE THINGS. Sometimes it's fine to just install Firefox or flatpak without configuring it declaratively guys, it's okay. You can if you want to but you don't have to.
@vimjoyer11 күн бұрын
Absolutely
@dtomvan11 күн бұрын
Yeah same, I currently have a LOT of home-manager configs but really I should be using stow more instead because that for example, rebuilding your neovim config every single time you make a tiny change isn't as nice as I thought 😅
@Anonymous404511 күн бұрын
Always remember it's YOUR system, nixos is meant to make it easier to manage but you can use it as much or as little as you want.
@TheOnlyGhxst10 күн бұрын
I do everything declaratively or use nix shell, that way my entire system is consistent across the board. Having some things installed declaratively and others imperatively causes inconsistencies which can lead to issue down the line.
@maxarendorff652110 күн бұрын
@ Keep in mind I meant not configuring every single Firefox extension or Flatpak in home manager and such, I don't mean actually using nix-env -iA, that's not good. I don't even use home manager anymore because it added too much complexity with not enough gain.
@ruroruro11 күн бұрын
Surprised that you didn't mention the "oops, I forgot to change the hash in a fixed-output derivation and got the old version" gotcha.
@vimjoyer11 күн бұрын
Haha, yeah, but it's less of a beginner mistake I guess
@ruroruro11 күн бұрын
@@vimjoyer I guess it's more of a "beginner Nix developer mistake" not a "beginner NixOS user mistake". But let's be honest, a lot of NixOS users end up learning how to develop (or at least patch) nixpkgs derivations eventually anyway.
@JellyfishJellyfish-bk7cr11 күн бұрын
One thing that still gets me is home manager already seeing a file in the location where it wants to place one and gives a very obscure error...
@1234minecraft567811 күн бұрын
@@ruroruro this is true and factual as i learned how to do just that last week, since the desired version isnt merged upstream yet.
@cozyinbed11 күн бұрын
Very helpful video but please make a video explaining FHS as well ❤
@vimjoyer11 күн бұрын
Absolutely will
@JoelJosephReji10 күн бұрын
Isn't nix-env the only way to "rebuild and switch" when using nix as a package manager on other distros? I have tried searching so much for figuring out how to do basic things like rebuild and switch when using nix as a package manager but it is so difficult to get good info. (I always see people using nix-env or the info is usually about nixos and not nix package manager.)
@vimjoyer10 күн бұрын
If you use nix on other distros, I recommend using home-manager, shells or at least nix profile. nix-env is bad and dangerous
@JoelJosephReji10 күн бұрын
@@vimjoyer Thanks! This is great help! I thought that nix shell would be a temporary thing, wouldn't it? Also, does home-manager in itself have a "rebuild and switch" command? My ultimate plan is to create modules for separate groups of packages that I have and create a home manager with all the required user applications and then install nixos so that I would be up and running very fast.
@vimjoyer10 күн бұрын
@@JoelJosephReji nix-shell is a temporary thing, but home-manager isn't. You can use it as a way to declare stuff on any distro
@JoelJosephReji10 күн бұрын
@ Thank you, I have already switched! (Pun Intended xD)
@deefdragon4 күн бұрын
re: 5:17 and making it all one file, the way that nix is constructed as a language, and how Ive built my config over time (you even say that learning over time is a good thing right after), adding things as Ive learned that I need them, makes making multiple files actually really hard. The documentation on suggested layouts is basically completely empty, and Ive honestly got no idea how to even start breaking things down. Not defending this mistake so much as explaining how it happens to so many people, and pointing out that saying "files are free" etc is completely ignoring the complexity inherent with using nix at times.
@245trichlorophenate11 күн бұрын
What's your monospace font?
@TheOnlyGhxst10 күн бұрын
I don't know the answer, but I CAN highly recommend the "Departure Mono" nerd font... I currently use it for everything on my system.
@vimjoyer10 күн бұрын
It's JetBrains Mono
@omg33ky10 күн бұрын
One thing i find very difficult is using jetbrains IDEs with direnv stuff. Or using plugins with those (that one kinda works but was a struggle) The thing with the direnv stuff was so annoying that i eventually gave up on it and just opened a console, navigated to that folder and starting the IDE from there, so it has the direnv loaded from being in the terminal that has it loaded... Its a shitty solution and I'd be glad to find a solution for it, but i just dont have the energy to deal with it. I just want it to work...
@shareclipsave8 күн бұрын
Can you do a nixos-promox setup?
@rezaosman923 күн бұрын
Please do tutorial of RKE2 setup in Nixos.
@Hckr-gs3rx11 күн бұрын
Very useful! Thank you!
@Space__man114911 күн бұрын
Great video 🔥
@PanTek-r8g2 күн бұрын
looking forward to the FHS tutorial.
@matejmudra992510 күн бұрын
The update mistake caught me after a year of using nix :D. The ctrl+C/V didn't work in rider. After many rebuilds, I realized that the lock file is still the same :D.
@vimjoyer10 күн бұрын
--upgrade does not work with flakes though, only nix update. I should have mentioned that
@hver.vef.11711 күн бұрын
Great video! You should probably change "popular" to "common" in the title to better reflect the purpose of the video.
@vimjoyer11 күн бұрын
I use clickbaity titles that bring more views. If I don't do it, they don't get recommended to anyone sadly
@theycallmesloth10 күн бұрын
It's been 4-5 months since i started using nixos and today is the day u found out about --upgrade lmao
@atomazu11 күн бұрын
2:07 made me laugh out loud lol
@d3bug64611 күн бұрын
you forgot changing the stateVerison when you dont know what you are doing
@americanbagel10 күн бұрын
Best Linux channel
@THEMithrandir0911 күн бұрын
Distributed nixpackages distribution when?
@filedotnix11 күн бұрын
Fairly certain --upgrade actually does nothing on flakes.
@vimjoyer11 күн бұрын
yes
@Anonymous404511 күн бұрын
Does it not run `nix flake update`? Or at least that's what `nh os switch -u` does, perhaps I'm spoiled by helper commands.
@TheOnlyGhxst10 күн бұрын
@@Anonymous4045 it does not, you have to run nix flake update manually before rebuilding.
@berkano46179 күн бұрын
Such a daddy voice) I love it🥰🥵
@playdead977911 күн бұрын
1:40 I feel shamed lol
@sho650111 күн бұрын
W sponsorship
@Aayushh0711 күн бұрын
at this point i would just use ubuntu. i am tired.
@vaisakh_km11 күн бұрын
Then you fight with ppa and miss declarative system and come back to nix
@Anonymous404511 күн бұрын
@@vaisakh_kmtbf you can use nix on ubuntu.
@alex.nabrodov11 күн бұрын
Two biggest errors: 1. Use nixOs if you're c++/electron developer 2. Do not nix at all (it is great after all)
@abbcc55511 күн бұрын
One of the biggest mistakes is trying to do anything on your own. You don't need to waste brain power in understanding the very obscure language only to create your config. There are people with unlimited time who can do that. It's simply not a good way to spend your time. Think of it as a cripple getting a dance degree - completely useless. You are way better off by downloading somebody else's config and just add the packages you need. That's all you gotta do.
@vimjoyer11 күн бұрын
Yeah, NixOS ecosystem is built on shoulders of giants, no need to reinvent the wheel
@tobeqz706511 күн бұрын
This is how i got a friend mine to use nixos a few months ago. I basically gave them my config and only told them how to search for and add packages/options and how to update. They love it thus far.
@teoconserv995411 күн бұрын
that is absolutely horrible advice. if anything goes wrong, or they have to change stuff on their system, they will be absolutely helpless to fix it. always understand your tools and at least one layer deeper, of what you use daily. don't be sheep.
@Anonymous404511 күн бұрын
You do you I suppose. If you don't need to run anything complex and just occasionally add more package names to a list, you really don't need to understand more.
@abbcc55510 күн бұрын
@@teoconserv9954 I see you are not familiar with NixOS yet. Well, anyway if you manage to mess something up by just adding a package, well, remove it and rebuild. And the mess is gone.
@ggorg011 күн бұрын
home-manager is like the Apple ecosystem's vendor lock-in... once you're in, there is no (easy) way out without manually rewriting all your configs in the original language...
@vimjoyer11 күн бұрын
Lmao, yeah
@thedude0011 күн бұрын
false, because home-manager integrates with non home-manager code In other words, you can partially rewrite. So, your "all" is incorrect
@andrebrandao69011 күн бұрын
did you know you can get the compile version from home-manager by just navigating to where the config should be, you will have to change the nixpkgs paths but its better than rewriting the config by hand
@Flackon11 күн бұрын
You can just copy the generated configs...
@delayslot560111 күн бұрын
Number 1 should be: trying to communicate on official forum while not being extremely woke lefty.
@themilkywayprince11 күн бұрын
Biggest mistake: use home-manager
@Space__man114911 күн бұрын
Why ??
@blackmine5711 күн бұрын
Okay I was about to start to use it. Why?
@vimjoyer11 күн бұрын
@blackmine57 I love, and highly recommend, using home-manager
@teoconserv995411 күн бұрын
@@Space__man1149 Because its implementation is absolute dogshit and it breaks shit all the time.
@Anonymous404510 күн бұрын
If you only have one user, sure. I have a user for personal stuff, one for school, and one for work. I don't want to mix up the apps/git settings/etc between all of them.
@asuraValo-00110 күн бұрын
Why my vscode loads slow on hyprland nixos using a /etc/nixos flake.nix and .config/home-manager/hone.nix with flake.nix and enabled hyprland on that flake
@asuraValo-00110 күн бұрын
Also how to configure system /etc/nixos/flake to use .config/home-manager/home.nix thanks