Ultimate NixOS Guide | Flakes | Home-manager

  Рет қаралды 110,073

Vimjoyer

Vimjoyer

6 ай бұрын

Discord server: / discord
Donations: ko-fi.com/vimjoyer
Code from the video: github.com/vimjoyer/flake-sta...
Also check out Iogamaster's video: • HOW to REALLY learn NixOS

Пікірлер: 232
@ryoschinlot9153
@ryoschinlot9153 6 ай бұрын
So, the flake.nix file in the video uses extraSpecialArgs, instead of specialArgs that Nix uses, so I got "error: function 'anonymous lambda' called with unexpected argument 'extraSpecialArgs'". For everyone getting the same issue, please replace "extraSpecialArgs = {inherit inputs;};" from the flake.nix file with "specialArgs = {inherit inputs;};". (Although, I am pretty sure that @Vimjoyer already fixed the template flake)
@ndudman8
@ndudman8 4 ай бұрын
had me stumped for a while, so thanks for this pinned comment... great video series... watched this many times over :)
@max_ishere
@max_ishere 3 ай бұрын
I should've read this comment earlier...
@mastercontrolprogram82
@mastercontrolprogram82 2 ай бұрын
Correct, extraSpecialArgs is a home-manager specific option.
@vimjoyer
@vimjoyer 6 ай бұрын
What do you guys think about the thumbnail?
@lennyescott
@lennyescott 6 ай бұрын
It's really cool, though the rainbow text seems a little out of place in the gruvbox theme
@vimjoyer
@vimjoyer 6 ай бұрын
​@@lennyescott Hmm, I agree. It looks kind of weird
@Redyf
@Redyf 6 ай бұрын
It's great, just like the video hehehe
@MehMeh-mj5hn
@MehMeh-mj5hn 6 ай бұрын
It is great, very clean and pleasing to the eye. However I would say though it's not very baity outside yours or the nix community. I know they are not the target audience but they are free views. Maybe remove the word nixos but keep the logo, To peek non nixos user clicking while keeping nixos user. Mental outlaw and fieship are what got me in to Linux because their thumbnail. I like the rainbow bow text.
@vimjoyer
@vimjoyer 6 ай бұрын
​@@MehMeh-mj5hnThat's a great advice. I should have written something like "Best Distro Ultimate Guide"
@yungabilify
@yungabilify 3 ай бұрын
saw your channel from NoBoilerplates good vid
@vimjoyer
@vimjoyer 3 ай бұрын
This shout-out brought 15 times the usual amount of new subscribers in one day. Huge thanks to Tris
@Lobbelt
@Lobbelt 3 ай бұрын
Convinced me to switch from Arch to NixOS as well - but takes some getting used to!
@HiAdrian
@HiAdrian 3 ай бұрын
@@LobbeltI would approach NB's enthusiasm with a healthy dose of skepticism. There is a propensity among young men to push "productivity" ideas without the necessary experience. The majority won't publicize their having backtracked on any such decisions. I haven't tried NixOS, but my sense it that its users run risk of the sunk cost fallacy.
@spaghettiking653
@spaghettiking653 28 күн бұрын
@@HiAdrian This is true. As long as you're actually doing work, rather than fixating merely on the ideal of productivity, then it should be fine to use any OS. I don't really see how Nix is going to make a difference in this case; it's just another fixation to get addicted to and another passionate idealism, which is perfectly in key for No Boilerplate, but probably too wondrous and lofty for the real world. In reality I've never had any trouble with packages whatsoever on my Mint install, and not even on my Gentoo install. The problems that Nix solves apparently don't exist for me at all. More power to you if you benefit from Nix, but I guess it couldn't be me...
@happybreadduck
@happybreadduck 6 ай бұрын
This is by far the best nix flake explanation on the internet
@ericwang3394
@ericwang3394 6 ай бұрын
This is THE best nix video I've ever watched! I've tried to understand nix multiple times, but I couldn't find any tutorial that covers how these files interact and how they relate to functions I care about systematically like you do. Please make more videos like this!
@user-mv9iy5ph1f
@user-mv9iy5ph1f 6 ай бұрын
Ugh where was this series when I started using NixOS??? Seriously though, this series is, in my opinion, one of the best resources on NixOS available on KZfaq, if not on the internet. Also I really adore your style of presenting and editing, keep up the good work :)
@vimjoyer
@vimjoyer 6 ай бұрын
It's just the beginning :D
@richardbennett4365
@richardbennett4365 6 ай бұрын
Me, too. It's the voice that is so calming, so enjoyable to listen to. The style and content of the presentations are exactly the way I learn best. He's straight to the point, doesn't needlessly add opinions or comments about what he is presenting. He just stays on topic and presents the information . . . and in such a clear way. I could listen to him for hours.
@rohansully584
@rohansully584 9 күн бұрын
Whole heartedly agree
@totallycarbon2106
@totallycarbon2106 5 ай бұрын
After using debian as my main distro for years and years - I've finally decided to give NixOS a try. This video was super helpful as a starting point for working on configs and has already given me ideas on how I can use flakes and modules to manage development environments. Thanks!
@thamenato
@thamenato 6 ай бұрын
Thank you for the video! By the end of it you're showing a recommended structure as to split into multiple hosts and create modules. I've been struggling with getting that to work and would love a follow up video on that! Tks again for the great content you're doing!
@ReneManqueros
@ReneManqueros 5 ай бұрын
100%
@abdullamasud4278
@abdullamasud4278 Ай бұрын
NixOS has been there for 20 Years!! What?? Why did I only start using this gem last year! NixOS is honestly the best distro for me. Sending much well wishes to all the developers who made NixOS come true
@justaguyalive6762
@justaguyalive6762 6 ай бұрын
Thanks for this, I was sleeping on my nix configuration, good reminder that I should start using it
@lennyescott
@lennyescott 6 ай бұрын
Oh, this is good! I have already set up everything, but this will be a great watch for anyone new! I'll be sure to recommend
@rabidhamper7
@rabidhamper7 3 ай бұрын
I wish I could like this video more than once. The transition from the old configuration.nix paradigm and the new flakes paradigm has kept me from looking at NixOS at all. I want to use flakes because it is obvious that is where Nix is headed, but I couldn't figure out how to get there. Thanks so much for this video!
@PublicSchwing
@PublicSchwing 3 ай бұрын
Nice video. I've found Nix to be the next logical step on my Linux journey, and flakes see to be a rough point for most, including myself. Lots of information in 15 minutes. Thanks!
@StrelokRadist
@StrelokRadist 6 ай бұрын
Thank you very much for populating the great system. I use NixOS desktop as an ordinary home user for 3 years. Many times I tried distro hoping, but had always been back to predictable reliable NixOS.
@branmuller
@branmuller 5 ай бұрын
This was awesome, best video for getting started with NixOS
@wolframitephoenix6737
@wolframitephoenix6737 2 ай бұрын
This video is so dense; but incredibly nice. Definitely migrating to NixOS, this is beautiful.
@Majiy00
@Majiy00 6 ай бұрын
As per usual a great video, I wish this had been around when I was learning nixos hahahah. Keep up the good work!
@vimjoyer
@vimjoyer 6 ай бұрын
Hope it will help some beginners, it's certainly better than my first NixOS guide
@Majiy00
@Majiy00 6 ай бұрын
@@vimjoyer I'm sure it will, please keep the nix content going it's great. I love seeing other ppls workflows and nicking bits I find cool.
@socialcollective1741
@socialcollective1741 2 ай бұрын
Excellent breakdown. I was also recommended from NoBoilerPlates channel. Subscribed and ready to learn more about NixOS.
@RealRespite
@RealRespite 4 күн бұрын
Excellent video thank you for easing my transition into nix os
@iuryfukuda
@iuryfukuda 6 ай бұрын
Awesome content. Many thanks for sharing it with us!!!
@wh7988
@wh7988 6 ай бұрын
currently staring at a blank nixos tty trying to setup hyprland. This video came just in time
@pmmeurcatpics
@pmmeurcatpics 3 ай бұрын
Isn't that literally one command though? "hyprland.enable = true" or something like that
@BeOnlyChaos
@BeOnlyChaos 6 ай бұрын
So concise, great vid.
@admasnd
@admasnd 6 ай бұрын
Excellent overview!
@arpiku8408
@arpiku8408 2 ай бұрын
Love and thanks for sharing such great knowledge.
@narpwa
@narpwa 11 күн бұрын
my brain is melting from the amount of piece of information this video has
@merulox
@merulox 6 ай бұрын
This is awesome! Thank you, really.
@user-to9hv8tp5k
@user-to9hv8tp5k 6 ай бұрын
Absolutely based video preview. Keep it up!
@sander-s
@sander-s 6 ай бұрын
Very good video! Thanks!
@ITSvietnam214
@ITSvietnam214 5 ай бұрын
Best nixos guide so far! Дякую!
@rafi_45
@rafi_45 6 ай бұрын
thank you so much for helping us to move configuration to flake.
@caddr
@caddr 6 ай бұрын
Nice
@m4rt_
@m4rt_ 6 ай бұрын
... this makes me want to try out nix. I'll try it when I eventually get myself a new laptop.
@GeorgeGzirishvili
@GeorgeGzirishvili 5 ай бұрын
Your channel is amazing, man! Especially the Nix series. I have used Linux for more than 11 years both on personal computers and servers, but I only recently got started with Nix. Your channel has been a great help so far, as well as a source of inspiration on what Nix can do. It's definitely going to be the next skill I master, and it'll probabely replace half of Ansible, Docker, and Nginx code I write, if not more. Not to mention managing my desktop configuration and automating installs with nixos-anywhere, Disko, flakes, and Home Manager! I initially didn't like Nix because it's not FHS compliant, and I'd prefer if it was, but it seems like there are solutions to this too, and you can still run software and scripts with hardcoded paths to executables. Keep up the good work! P.S.: Дякую! І Слава Україні! 🇺🇦🇬🇪 The accent and the name of the month on the top panel were dead giveaways. 😃
@harinho6117
@harinho6117 6 ай бұрын
Estava pensando em começar a usar essa distro, essa é uma boa oportunidade começar
@vimjoyer
@vimjoyer 6 ай бұрын
👍
@Redyf
@Redyf 6 ай бұрын
Estou usando há mais de um ano, é a melhor distro que já vi porém devo te avisar que requer uma quantidade de tempo decente para poder realmente entender o sistema e seu paradigma. Tem vários sites que explicam hoje em dia e ótimos youtubers também então é bem mais fácil do que quando eu comecei, recomendo muito caso você queira aprender algo novo ou tenha interesse em devops.
@StaffyDoo
@StaffyDoo Ай бұрын
This pill is gold! 🙌
@authenticLC
@authenticLC 5 ай бұрын
I love the idea of NixOS. The Nix package manager has packages for DaVinci Resolve out of all things and is super simple to install Hyprland with. Unfortunately Nvidia and NixOS don't work so well together and kept getting visual bugs on bare metal. When I get an Intel or AMD card I'm definitely going to continue with NixOS.
@blicero10979
@blicero10979 4 ай бұрын
for anyone still having issues... in the flake file... its specialArgs and in configuration.nix... its extraSpecialArgs... i was stuck on this for a while... making them both specialArgs. wonderful series... I finally got past this hurdle ... thank you.
@vimjoyer
@vimjoyer 4 ай бұрын
Yeah, I fixed it in the repo, but unfortunately, I cannot edit the video.
@blicero10979
@blicero10979 4 ай бұрын
@@vimjoyer yeah no worries!! Im also curious about another thing... when you move the configuration.nix to the the host folder... do you remove the inputs.home-manager.nixosModules.default from the modules in the flake config? in the video... about the 13:40 mark the flake no longer has the inputs.home-manager line in the modules... is that b/c its in the congifuration.nix imports section?
@LowHangingFruitForest
@LowHangingFruitForest 14 күн бұрын
@@vimjoyerjust add a text pop up with the correction
@brunek1322
@brunek1322 2 ай бұрын
I rewatched this video like 10 times (5 because I was slow and 5 times the default gnome browser froze the video). Also you talk fast and do things fast but treat it as a compliment because it's better to rewatch video than wait for some guy to think and make sounds of thinking 😂😂😂
@vimjoyer
@vimjoyer 2 ай бұрын
Yeah, I hear that quite often. I'm still learning to maintain a good pace
@RealJonzuk
@RealJonzuk Ай бұрын
this is not worth using i already got nixos setup and now switching it all to homemanager and flakes is not worth it i have to take LSD to be able to figurethis out liek wtf
@Elristan
@Elristan 2 ай бұрын
Okay! That was a ride. Finally made it to the end of the video (I mean, doing the thing, I've probably watched it 20 times additively)! Now I'm being stumped though: why are you moving /e/nixos to ~/ ? I did it thinking it was about making is a non-root directory and now I'm hella confused with my super obsolete memory of how to do permissions in linux. Edit: nevermind, figured out the permissions. Totally forgot x was needed to ls in a directory. Now I'm still stumped by the fabled sudo-less rebuild, but I guess more friendly manual ahead! ... Diving back into Linux with NixOS was probably a bad idea, but hey. Mama didn't raise no quitter
@KristjanKask
@KristjanKask 6 ай бұрын
Before watching. No way! How are you gonna do this in 15min??? After watching. Wow, great job!
@vimjoyer
@vimjoyer 6 ай бұрын
I couldn't fit everything in, but the most essential parts to get a working system are there.
@sethm7761
@sethm7761 3 ай бұрын
Great video. Two questions (1) When you do the rebuild, do you always use the flake command or non flake version? (2) For the portion about further splitting your config files, can you elaborate or point to the import/export setup? I assume this means I would instead setup something like the alacrity config in the modules, then import into home.nix?
@vimjoyer
@vimjoyer 3 ай бұрын
Use --flake for rebuilds. Non--flake version will use system's nixpkgs channel and won't include any modules you imported in your flake.
@erichanson5628
@erichanson5628 6 ай бұрын
Thank You!!!
@vimjoyer
@vimjoyer 6 ай бұрын
You are welcome!
@user-gy4kv4km8f
@user-gy4kv4km8f 6 ай бұрын
goated
@robosergTV
@robosergTV Ай бұрын
Дякую.
@JellyfishJellyfish-bk7cr
@JellyfishJellyfish-bk7cr 3 ай бұрын
Sub earned
@rishabarora9269
@rishabarora9269 3 ай бұрын
Hi Vimjoyer, Thanks for the great video! Also I have a question, there is a folder located at ~/.config/home-manager with a flake.nix and home.nix file. Are they necessary files for home manager or are they safe to delete?
@vimjoyer
@vimjoyer 3 ай бұрын
They are safe to delete with this setup. You can regenerate them any time with `home-manager init`.
@rishabarora9269
@rishabarora9269 3 ай бұрын
@@vimjoyer thank you!
@user-yz1kx8zp2r
@user-yz1kx8zp2r 6 ай бұрын
Дякую!
@vimjoyer
@vimjoyer 6 ай бұрын
Будь ласка!
@cryptokrupt
@cryptokrupt 3 ай бұрын
What theme do you use for your code? It looks awesome!
@vimjoyer
@vimjoyer 3 ай бұрын
Everything you see in this video is done with motion canvas.
@eduardabramovich1216
@eduardabramovich1216 Күн бұрын
could you make a tutorial on how to customize zsh with detail using home-manager?
@felixjohnson3874
@felixjohnson3874 2 ай бұрын
One thing is that I wish there were tools to streamline some parts of Nix. For instance Homemanager is great in concept but it means anytime you want to configure a program you *_need_* to interact with it's config file directly, figure out how to get the change you want, and make/modify the module for it. I wish there was some diff integration tool or something that could look at the state of your config file(s) and autogenerate/modify a basic module to basically "pull" those changes into your nix config. Nix is great in a lot of ways but it's those little usability hurdles that do really annoy me. There are times when you just want to change a setting without needing to directly fiddle with the config files. (Sorta like how nix shell just lets you install and run something without *_actually_* having to install it)
@vimjoyer
@vimjoyer 2 ай бұрын
There are a couple of GUI tools to edit your nix files, but they aren't much simpler than just editing a file. You could use some kind of sed script to do it, but yeah ... not ideal. Maybe some day
@DavidLindes
@DavidLindes 3 ай бұрын
8:38 - I'm curious, how'd you get these icons in your ls output? Is there some option to ls that I'm not aware of? A different version of ls, perhaps? Or are you just post-processing it manually for the video? Other? Curious to know more (even in the post-processing case, I'd be interested in what your method for doing so is)!
@vimjoyer
@vimjoyer 3 ай бұрын
ls is aliased to eza on this screenshot, but in newer videos I'm using video editing magic for this.
@DavidLindes
@DavidLindes 3 ай бұрын
@@vimjoyer cool, I'll check it out. (I also found els, which I guess is similar.)
@jawuku3885
@jawuku3885 5 ай бұрын
I'm trying NixOS as a Virtual Machine on my Macbook M1. In case anyone is trying also, I had to make a minor adjustment to the flake.nix to change the processor architecture. In the `outputs` section, change the system variable to "aarch64-linux", i.e. system = "aarch64-linux";
@RyanJensenEE
@RyanJensenEE 3 ай бұрын
What software do you use to generate the animated transitions between different versions of text files?
@vimjoyer
@vimjoyer 3 ай бұрын
motion canvas
@nikoraasu6929
@nikoraasu6929 5 ай бұрын
I keep telling myself that when I get a 2tb SSD I will put on a couple of OSes on it, and Nix might be the first one, followed by Gentoo and Arch
@xorlop
@xorlop 6 ай бұрын
Rejoice! A video I can send to my ffriends :)))))
@georgeanastasiou2680
@georgeanastasiou2680 5 күн бұрын
Thank you for the video, system configuration is stored in configuration.nix and you can rollback, but can you rollback also nix flake upgrades? Is it a simple change on pointing to anothe hash commit?
@vimjoyer
@vimjoyer 5 күн бұрын
It's best to keep your flake.lock under version control with something like nix. The you can easily roll back updates by going to an older commit
@goofansu
@goofansu 5 ай бұрын
Hi, thank you for the video, I’m using Nix on macOS, and it changed my life. May I know your hardware for NixOS? I’m considering to get a device for NixOS. I see people using Wayland for window manager, I’m also interested in it.
@vimjoyer
@vimjoyer 5 ай бұрын
I'm using a Lenovo Legion 5 laptop with RTX 3060 and and cpu
@DeuxisWasTaken
@DeuxisWasTaken 2 ай бұрын
Do note that in addition to searching packages, the same website has an option searching function that you can use instead of searching through man.
@untitled8027
@untitled8027 29 күн бұрын
all i got was a ton of errors. nix is a pain in the behind. wish the docs were clearer.
@jorge28624
@jorge28624 6 ай бұрын
I rather manage home-manager apart from the system configuration, I feel cumbersome to `sudo` into a file that could perfectly live next to the rest of my user files.
@vimjoyer
@vimjoyer 6 ай бұрын
Yes, but for beginners, I think it's easier to have everything in one command. Additionally, home-manager rebuilds are stored with system rebuilds, making rollbacks easy
@richardbennett4365
@richardbennett4365 6 ай бұрын
I have an extensive /etc/nixos/configuration.nix file declaring the installation of applications for R and python suitable for a data science / data analysis / machine learning workstation. The channel is nixos-23.05. Everything built for my 2023-11-04 installation, but if I try to rebuild anything now, I get errors. The errors are all "dependencies of derivation ' . . . ' failed to build. Some examples are python3.10-jupyter-server-2.0.6, python3.10-notebook-shim-0.2.2, sage-with-env-10.0, r-quarto-1.2, RStudio-2022.07.1+554-wrapper, etc. Am I receiving these 'failed to build' errors now because the channel is 23.05? Recommendation? Switch to 24.05 (unstable) or to 23.11?
@kayachan5198
@kayachan5198 4 ай бұрын
so i made it to the end and it made sense, kind of, but the structuring part threw me off a bit, i think when i do this i wont bother with that for now. i watched someone else do a video on flakes and created "my first flake!" however there was an added layer of complexity to theirs because they copied the configuration.nix from /etc/nixos/ to a new folder in ~/ and then the output for the flake was that new config file, so i ended up with 2 configuration.nix, not knowing what the point or purpose of the 1 in /etc/nixos/ was anymore.. thank you for the video, my head is actually hurting which is a good sign that i may be close to learning something new if i stick to it do you have any reccomendations for a text edtior that shows the tree or structure (sory i dont know the terminology) of whatever it is you are editing e.g. if i had flake.nix open in it, it would list stuff from that flake.nix in an almost file browser tree kind of way on the side somewhere? (if you want to know what i mean then if you search for 'nix flakes' on youtube his video is the purple 1)
@vimjoyer
@vimjoyer 4 ай бұрын
My editor of choice is neovim, and it has a ton of different file manager plugins. NvimTree and NeoTree plugins display directories in a tree-view, and you can even integrate your favorite TUI file manager (e.g. LF or ranger) into it.
@redm00n748
@redm00n748 2 ай бұрын
i did not know father made linux tutorial
@rishi2504
@rishi2504 4 ай бұрын
The 'extraSpecialArgs' at 11:18 gives the following error: error: function 'anonymous lambda' called with unexpected argument 'extraSpecialArgs' I need to switch it to 'specialArgs' for it to work.
@vimjoyer
@vimjoyer 4 ай бұрын
yes, I made a mistake while editing the video
@grandpaspoopsock
@grandpaspoopsock 3 ай бұрын
Can you try GuixOS? I've been very curious because on paper the features and design seem better, especially since everything is in scheme, but adoption seems much lower.
@vimjoyer
@vimjoyer 3 ай бұрын
One if it's features is total absence of proprietary software in it's repos. I'm primarily using nixos on desktop machines with Nvidia, so guix won't do for me without a ton of workarounds. I also like nix language a lot more than guix lisp. json-like files are easier to read and edit. I might do a comparison of the two, but I can really see why adoption in lower.
@panzerthetank
@panzerthetank 6 ай бұрын
gruvbox
@Euphorya
@Euphorya 3 ай бұрын
Are there any recommended guides on installing Nix with disk encryption?
@vimjoyer
@vimjoyer 3 ай бұрын
NixOS wiki includes a couple of links at the bottom: nixos.wiki/wiki/Full_Disk_Encryption
@abdullamasud4278
@abdullamasud4278 5 ай бұрын
can you make a tutorial on cron job in nixos please? I find it quite hard to implement
@davidjeters
@davidjeters 6 ай бұрын
how did you get syntax highlighting in your man pages? is it because of the zsh or your terminal? Mine is all just white on black.
@vimjoyer
@vimjoyer 6 ай бұрын
Probably zsh
@HiAdrian
@HiAdrian 3 ай бұрын
You can also use nvim as a pager btw (PAGER="nvim +Man!"), which is much nicer imo, since all familiar controls are available.
@user-mv3gr5cd6n
@user-mv3gr5cd6n 4 ай бұрын
Дякую! Крутий контент! Круто було якби плейлист був також на Українській 😊
@vimjoyer
@vimjoyer 4 ай бұрын
Чесно кажучи, звук для мене - найскладніша частина, тому для запису двох треків знадобилося б занадто багато часу
@rl-bw5cm
@rl-bw5cm 4 ай бұрын
Everything breaks down at 12:16 for me: The command "nix run home-manager/master --init" doesn't run, whether I include the && sudo ... second command with it or not. Complains about the --init flag. Anybody else have that problem?
@vimjoyer
@vimjoyer 4 ай бұрын
There's a space after -- The -- is there because you stop passing arguments to nix and start passing them to the program (home-manager in this case).
@eduardabramovich1216
@eduardabramovich1216 Күн бұрын
Quick question, if I'm running nixos 24.05 and my flake (your template) specifies in the inputs the nixos-unstable channel, does that mean my whole system will move to the unstable branch when i do the rebuild (with the --flake flag) ?
@vimjoyer
@vimjoyer Күн бұрын
Yes
@eduardabramovich1216
@eduardabramovich1216 Күн бұрын
@@vimjoyer thanks a lot, I'm new to nixos so i will change the unstable part for my current 24.05 version. Not sure if unstable really works like a rolling release but in arch linux i get so many updates constantly... thanks again!
@apexcodes
@apexcodes 3 ай бұрын
Nix users 5 seconds after installing an OS that only has 1 config file for literally everything: hmm, this is nice, but how can I add more config files?
@vimjoyer
@vimjoyer 3 ай бұрын
You can put your entire configuration in the flake.nix btw (cursed)
@user-fr6tb2ey8s
@user-fr6tb2ey8s 3 ай бұрын
can someone tell me how to install ruby 2.4.t as in ubuntu im using rbenv to do so how can here we achive this
@dennis1790
@dennis1790 Ай бұрын
Do I still need to add home-manager package in system packages with this approach? I cannot run 'home-manager' commands
@vimjoyer
@vimjoyer Ай бұрын
No, it will integrate with your regular system generations. nixos-rebuild switch will also update home-manager, and rolling back to an older generation will happen for both too
@micycle8778
@micycle8778 Ай бұрын
is it safe to use the configuration.nix file to reproduce a nix install if the `system.stateVersion`s are different?
@vimjoyer
@vimjoyer Ай бұрын
Yes
@kartikgupta9117
@kartikgupta9117 3 ай бұрын
the terminal theme looks pretty , where can i get that on ubuntu
@vimjoyer
@vimjoyer 3 ай бұрын
Colorscheme is called gruvbox, and the prompt is just a custom PS1
@jtfidje
@jtfidje 5 ай бұрын
Could you please explain what the `default` in `inputs.home-manager.nixosModules.default` refers to? Can/should it be changed if I have multiple hosts?
@vimjoyer
@vimjoyer 5 ай бұрын
it refers to a module provided by home-manager that gives you the special `home-manager` option. `inputs.home-manager` part means that it comes from your flake inputs, and `nixosModules.default` is located in home-manager flake's outputs. It should stay the same for every host that needs to use home-manager
@jtfidje
@jtfidje 5 ай бұрын
@@vimjoyer thx!
@KarstenFinderupPedersen
@KarstenFinderupPedersen 6 ай бұрын
Is there an easy way of referencing the modules folder in the root directory from a nested file, like in a host? I am using this to import modules, but its quite long if I wanted more modules: imports = [ ../../modules/home-manager/programs/nvim .. ]; I am thinking of just shortening the start and appending "nvim" and so on for each program, but it could be nice with something like inputs.modules.programs.nvim
@vimjoyer
@vimjoyer 6 ай бұрын
you can do that with outputs. do a let inherit (self) outputs; in in the inputs, and then pass outputs to specialArgs. you'll be able to access all other outputs that your flake provides in every module, so you can then define your modules in the flake.
@benign4823
@benign4823 6 ай бұрын
​@@vimjoyerYou can also just use self directly as well no?
@KarstenFinderupPedersen
@KarstenFinderupPedersen 6 ай бұрын
Thanks I will do that :)
@vimjoyer
@vimjoyer 6 ай бұрын
@@benign4823 of course
@user-fr6tb2ey8s
@user-fr6tb2ey8s 2 ай бұрын
flake 'path:/etc/nixos' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."default".config.system.build.nixos-rebuild', 'legacyPackages.x86_64-linux.nixosConfigurations."default".config.system.build.nixos-rebuild' or 'nixosConfigurations."default".config.system.build.nixos-rebuild' Did you mean nixosConfigruations?
@mactemporal1980
@mactemporal1980 3 ай бұрын
So at the end of the day we end up with multiple config files. Kind of the opposite of NixOS' premise of having just one no?
@vimjoyer
@vimjoyer 3 ай бұрын
Ideally you should aim to reuse like 90% of the config with modules. Your machines will likely have different hardware and serve different purposes, so nixos lets you choose which parts you want to sync between them.
@mactemporal1980
@mactemporal1980 3 ай бұрын
@@vimjoyer Ok but I can still put all the softwares configs in configuration.nix if I want?
@godminnette2
@godminnette2 3 ай бұрын
@@mactemporal1980 Yes. The primary purpose of him doing this is to have slightly different configurations across different machines to suit them. If you plan on having just one machine, it can be one file. If you want the same software across different hardware configurations, best to have at least two files: one for software, one for hardware.
@mastermonday
@mastermonday 3 ай бұрын
I'm having trouble with the last part of the video where you nest your configuration files. When I import the configuration in the same folder as just ./configuration.nix it's working, but when I move my files and point to ./hosts/default/configuration.nix I'm getting an error: error: getting status of '/nix/store/n392z7lcgs3dsf1pb4nf95hap00wrzb6-source/hosts': No such file or directory Earlier in the error chain it is saying: throw "Module imports can't be nested lists. Perhaps you meant to remove one level of lists? Definitions: ${showDefs defs} I can't figure out where it's going wrong?
@vimjoyer
@vimjoyer 3 ай бұрын
If you are using git, make sure to add all changes before rebuilding. flakes don't see unstaged directories and files.
@luqmaanmohideen8422
@luqmaanmohideen8422 6 ай бұрын
ur def from the bulkans /eastern eu
@vimjoyer
@vimjoyer 6 ай бұрын
Ukraine
@MalwarePad
@MalwarePad 2 ай бұрын
Which ohmyzsh theme are you using?
@vimjoyer
@vimjoyer 2 ай бұрын
I don't use ohmyzsh
@MalwarePad
@MalwarePad 2 ай бұрын
​@@vimjoyeroooh, okay. I really like that prompt, mind sharing your dotfiles or something?
@NathanMautz
@NathanMautz 3 ай бұрын
What is a fresh package? I keep hearing that term but I don't get the difference between a package and a fresh package.
@vimjoyer
@vimjoyer 3 ай бұрын
Fresh packages are packages that are up to date with the latest versions of software. For example, if a package contains software with version 0.10, and the latest GitHub release is also 0.10.
@davidturcotte831
@davidturcotte831 6 ай бұрын
NixOS is an operating system that can take months or years to master. The Ultimate NixOS Guide is about 15 minutes long. Something seems to be incongruent here.
@vimjoyer
@vimjoyer 6 ай бұрын
Sorry, if I wanted to cover everything there is to know about it with animations, I'd die of old age before finishing.
@davidturcotte831
@davidturcotte831 6 ай бұрын
@@vimjoyer Haha! True enough. Good video as always.
@davidturcotte831
@davidturcotte831 5 ай бұрын
@@vimjoyer I finally tried your flake template. By default, I am getting the infamous error: ... while calling the 'seq' builtlin
@Ikxi
@Ikxi 3 ай бұрын
Why are you using the unstable branch? I think most people would probably want to use a stable one, just so nothing unexpected breaks.
@vimjoyer
@vimjoyer 3 ай бұрын
Upstream branch is where everything starts breaking. Unstable is not bleeding edge, so it's a perfect middle ground between having super fresh packages and well tested tested ones
@setaindustries
@setaindustries 3 ай бұрын
For some reason after doing the setup for homemanager and trying to rebuild the process just stops with exitcode 9. --It doesn't give any error messages or anything, the terminal tab just closes itself.-- Running the command with --verbose tells me "home-manager.specialArgs" doesn't exist in configuration.nix even though I clearly wrote it in there? What am I doing wrong?
@vimjoyer
@vimjoyer 3 ай бұрын
use `home-manager.extraSpecialArgs`
@setaindustries
@setaindustries 3 ай бұрын
​@@vimjoyerThanks, will try!
@richardbennett4365
@richardbennett4365 6 ай бұрын
I have a working NixOS 23.05 last updated / built with Generation 35 on 04 November 2023. I cannot get it updated, and switching to the latest channel did not help. It builds tons of packages and after 2h36min of $ nixos-rebuild build, fails with dependencies of dbus, unit-accounts-daemon, unit-polkit.service, user-units, and X-Restart-Triggers failing to build. It is odd that everything built from the 23.05 Stoat channel to get me to Generation 35 on 04 November 2023, but now I cannot update or upgrade this 23.05 to 23.11 Tapir (also tried) and 24.05 Uakari. My only thought is to take my configuration.nix file and use it to install a fresh unstable / 24.05 Uakari into another partition to see if a # nixos-install can build this configuration.
@vimjoyer
@vimjoyer 6 ай бұрын
Tough problem, I'd suggest incrementally move features to a clean configuration, while separating everything into modules so it's easier to work with it in the future.
@richardbennett4365
@richardbennett4365 6 ай бұрын
​@@vimjoyer, I finally got around the blocks to the building process. There was a printer driver that I had to leave out and an R package that had an incorrect SHA256 checksum. I'm running my declared environment with the unstable channel. I didn't need to break things down into modules, but thanks for the idea. I may need to use modules in the future.
@dotanuki3371
@dotanuki3371 6 ай бұрын
What is the relationship between a channel url and the nixos/nixpkgs/nixos-unstable url?
@vimjoyer
@vimjoyer 6 ай бұрын
repo owner on GitHub / repo name / branch or commit
@vimjoyer
@vimjoyer 6 ай бұрын
Repo owner on GitHub / repo name / branch or commit
@mechan1sm_
@mechan1sm_ 2 ай бұрын
Can you tell me please, why intalling the nix package manager forces me to install the whole shitty aws sdk as dependency even if I do not use amazon server?
@vimjoyer
@vimjoyer 2 ай бұрын
🤷‍♂️
@Jack-ht7hz
@Jack-ht7hz 5 ай бұрын
Im having problem adding hosts cannot no file or directory. It only works if a rename it to default
@vimjoyer
@vimjoyer 5 ай бұрын
If you are using git make sure to add all files, flakes don't see unstaged files
@Jack-ht7hz
@Jack-ht7hz 4 ай бұрын
@@vimjoyer yes that was it thanks for the help!
@BlueskyFR_
@BlueskyFR_ 3 ай бұрын
Hey, I don't have the `man home-configuration.nix` command working after following the video. What can I do?
@vimjoyer
@vimjoyer 3 ай бұрын
Check if your home-manager module is enabled and home-manager itself is working
@Anonymous4045
@Anonymous4045 3 ай бұрын
You have to rebuild before you can use the manpage.
@user-ge7qx9ti1s
@user-ge7qx9ti1s 3 ай бұрын
early on, when trying to rebuild, I get the error that no matches are found: /etc/nixos#default. what am I doing wrong?
@vimjoyer
@vimjoyer 3 ай бұрын
You probably missed something, but there is not enough context to know what. Make sure that flake.nix file exists in /etc/nixos, that command you are running is correct and that you are using sudo.
@user-ge7qx9ti1s
@user-ge7qx9ti1s 3 ай бұрын
Ive added the experimental feature flakes to my /etc/nixos/configuration.nix file. Wrote the starter config to /etc/nix/flake.nix using sudo. when running the command `sudo nixos-rebuild switch --flake /etc/nixos#default` it returns `no matches found: /etc/nixos#default`. perhaps I missed a step from a prior video? @@vimjoyer
@kozlovskyi
@kozlovskyi 3 ай бұрын
Вітання))
@Bunuffin
@Bunuffin Ай бұрын
Naaaah I'm gonna stick with fedora xD By brain is imploding, I can find my way around Hyprland but nix is too much.
@vimjoyer
@vimjoyer Ай бұрын
You can do it, I believe in you!
@Bunuffin
@Bunuffin Ай бұрын
@@vimjoyer I don't know if i understand correctly, but with flakes and code you provided when i upgrade "nix flake update" it pulls from unstable branch right? Do I still put the wanted packages in the configuration.nix? I'm kinda confused on how to packages upgrade, you don't use "nixos-rebuild" that's the flakes job, right... Been using linux for over 2 years but Nix is hella confusing to me
@overthevistas
@overthevistas 3 ай бұрын
Could anyone please tell me what font he is using
@vimjoyer
@vimjoyer 3 ай бұрын
Jetbrains Mono NerdFont
@overthevistas
@overthevistas 3 ай бұрын
@@vimjoyer Thank you so much! Great video btw!
@NikolajLepka
@NikolajLepka 3 ай бұрын
your pronunciation of "etc" made me realise why the store "etsy" is named the way it is....
@vimjoyer
@vimjoyer 3 ай бұрын
Yeah, makes sense
@TomasSandven
@TomasSandven 6 ай бұрын
"Focusing on *simple* declarative configuration" LOL
@vimjoyer
@vimjoyer 6 ай бұрын
Haha, it can get as complex as you want it to be, but I'd say that generally editing the basic configuration.nix is pretty simple. I mean, doing programs.hyprland.enable = true; is dead simple.
@TomasSandven
@TomasSandven 6 ай бұрын
@@vimjoyer Fair enough 🙂 it's pretty simple until you want to do anything that isn't explicitly supported. That's when the fun begins.
@This_Guy-
@This_Guy- 6 ай бұрын
I use arch by the way
@vimjoyer
@vimjoyer 6 ай бұрын
Time to distrohop
@This_Guy-
@This_Guy- 6 ай бұрын
@@vimjoyer nah bro am happy with arch 😂😂😁😀😃
Nix File Fetching | fetchurl and Flakes
4:21
Vimjoyer
Рет қаралды 6 М.
Nix and NeoVim
13:38
ThePrimeTime
Рет қаралды 116 М.
Китайка и Пчелка 4 серия😂😆
00:19
KITAYKA
Рет қаралды 3,7 МЛН
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 8 МЛН
You Should Use Flakes Right Away in NixOS!
26:09
LibrePhoenix
Рет қаралды 50 М.
Say Goodbye to Containers - Ephemeral Environments with Nix Shell
16:58
Grazer Linuxtage 2024 -  Fully declarative Homelab on NixOS ❄️
23:53
Grazer Linuxtage
Рет қаралды 1,2 М.
Nix flakes explained
7:22
Vimjoyer
Рет қаралды 62 М.
Tmux has forever changed the way I write code.
13:30
Dreams of Code
Рет қаралды 909 М.
zoxide has forever improved the way I navigate in the terminal.
9:53
Dreams of Autonomy
Рет қаралды 406 М.
NIX OS: the BEST package manager on the MOST SOLID Linux distribution
17:08
The Linux Experiment
Рет қаралды 300 М.
Effective Neovim: Instant IDE
16:16
TJ DeVries
Рет қаралды 771 М.
NixOS Has One BIG Problem
17:48
The Linux Cast
Рет қаралды 60 М.
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 5 МЛН
Купил этот ваш VR.
37:21
Ремонтяш
Рет қаралды 234 М.
Main filter..
0:15
CikoYt
Рет қаралды 5 МЛН
Mi primera placa con dios
0:12
Eyal mewing
Рет қаралды 719 М.
КОПИМ НА АЙФОН В ТГК АРСЕНИЙ СЭДГАПП🛒
0:59