Ultimate NixOS Guide | Flakes | Home-manager

Поделиться
HTML-код
  • Опубликовано: 9 дек 2023
  • 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
  • НаукаНаука

Комментарии • 245

  • @ryoschinlot9153
    @ryoschinlot9153 7 месяцев назад +168

    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 5 месяцев назад +5

      had me stumped for a while, so thanks for this pinned comment... great video series... watched this many times over :)

    • @max_ishere
      @max_ishere 5 месяцев назад +5

      I should've read this comment earlier...

    • @mastercontrolprogram82
      @mastercontrolprogram82 3 месяца назад +2

      Correct, extraSpecialArgs is a home-manager specific option.

  • @vimjoyer
    @vimjoyer  7 месяцев назад +123

    What do you guys think about the thumbnail?

    • @lennyescott
      @lennyescott 7 месяцев назад +24

      It's really cool, though the rainbow text seems a little out of place in the gruvbox theme

    • @vimjoyer
      @vimjoyer  7 месяцев назад +8

      ​@@lennyescott Hmm, I agree. It looks kind of weird

    • @Redyf
      @Redyf 7 месяцев назад +12

      It's great, just like the video hehehe

    • @MehMeh-mj5hn
      @MehMeh-mj5hn 7 месяцев назад +8

      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  7 месяцев назад +3

      ​@@MehMeh-mj5hnThat's a great advice. I should have written something like "Best Distro Ultimate Guide"

  • @yungabilify
    @yungabilify 5 месяцев назад +193

    saw your channel from NoBoilerplates good vid

    • @vimjoyer
      @vimjoyer  5 месяцев назад +70

      This shout-out brought 15 times the usual amount of new subscribers in one day. Huge thanks to Tris

    • @Lobbelt
      @Lobbelt 5 месяцев назад +10

      Convinced me to switch from Arch to NixOS as well - but takes some getting used to!

    • @HiAdrian
      @HiAdrian 4 месяца назад +6

      @@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 2 месяца назад

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

    • @sagizm0nd
      @sagizm0nd 29 дней назад +2

      @@HiAdrian while there is much of "productive" runners, it is honestly an interesting hobby too, i see many people having harmless fun and i do not mind it. For me nix will be the way to revert my mistakes, i am pretty clumsy in os (like selecting wrong kernel and drivers for my devices and then trying to fix it eventually breaking system) pretty common beginners mistake, for me it would be fixable with nix, without so much of time and energy involvement.

  • @happybreadduck
    @happybreadduck 7 месяцев назад +57

    This is by far the best nix flake explanation on the internet

  • @user-mv9iy5ph1f
    @user-mv9iy5ph1f 7 месяцев назад +58

    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 RUclips, if not on the internet. Also I really adore your style of presenting and editing, keep up the good work :)

    • @vimjoyer
      @vimjoyer  7 месяцев назад +6

      It's just the beginning :D

    • @richardbennett4365
      @richardbennett4365 7 месяцев назад +1

      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 Месяц назад

      Whole heartedly agree

  • @abdullamasud4278
    @abdullamasud4278 3 месяца назад +19

    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

  • @ericwang3394
    @ericwang3394 7 месяцев назад +37

    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!

  • @totallycarbon2106
    @totallycarbon2106 7 месяцев назад +9

    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!

  • @narpwa
    @narpwa Месяц назад +5

    my brain is melting from the amount of piece of information this video has

  • @justaguyalive6762
    @justaguyalive6762 7 месяцев назад +3

    Thanks for this, I was sleeping on my nix configuration, good reminder that I should start using it

  • @lennyescott
    @lennyescott 7 месяцев назад +7

    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

  • @PublicSchwing
    @PublicSchwing 5 месяцев назад +4

    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!

  • @thamenato
    @thamenato 7 месяцев назад +17

    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!

  • @YBWang-pi9qq
    @YBWang-pi9qq Месяц назад +2

    You explain complicated concepts in such a easy way, natural Talent in teaching! Please make more such excellent videos.
    I finally decided to try Nixos, as a result of your videos, so helpful!

  • @rabidhamper7
    @rabidhamper7 5 месяцев назад +2

    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!

  • @branmuller
    @branmuller 6 месяцев назад +2

    This was awesome, best video for getting started with NixOS

  • @StrelokRadist
    @StrelokRadist 7 месяцев назад +3

    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.

  • @Majiy00
    @Majiy00 7 месяцев назад +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  7 месяцев назад +3

      Hope it will help some beginners, it's certainly better than my first NixOS guide

    • @Majiy00
      @Majiy00 7 месяцев назад +1

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

  • @insurrectusresistus
    @insurrectusresistus 4 месяца назад +2

    Excellent breakdown. I was also recommended from NoBoilerPlates channel. Subscribed and ready to learn more about NixOS.

  • @wolframitephoenix6737
    @wolframitephoenix6737 4 месяца назад +1

    This video is so dense; but incredibly nice. Definitely migrating to NixOS, this is beautiful.

  • @BeOnlyChaos
    @BeOnlyChaos 7 месяцев назад +2

    So concise, great vid.

  • @iuryfukuda
    @iuryfukuda 7 месяцев назад +1

    Awesome content.
    Many thanks for sharing it with us!!!

  • @admasnd
    @admasnd 7 месяцев назад +2

    Excellent overview!

  • @arpiku8408
    @arpiku8408 3 месяца назад +1

    Love and thanks for sharing such great knowledge.

  • @ITSvietnam214
    @ITSvietnam214 7 месяцев назад +1

    Best nixos guide so far! Дякую!

  • @user-to9hv8tp5k
    @user-to9hv8tp5k 7 месяцев назад +1

    Absolutely based video preview. Keep it up!

  • @merulox
    @merulox 7 месяцев назад +2

    This is awesome! Thank you, really.

  • @sander-s
    @sander-s 7 месяцев назад +2

    Very good video! Thanks!

  • @RealRespite
    @RealRespite Месяц назад +1

    Excellent video thank you for easing my transition into nix os

  • @JasonYor
    @JasonYor Месяц назад +3

    Gotta trust in that helmet

  • @wh7988
    @wh7988 7 месяцев назад +5

    currently staring at a blank nixos tty trying to setup hyprland. This video came just in time

    • @pmmeurcatpics
      @pmmeurcatpics 5 месяцев назад

      Isn't that literally one command though? "hyprland.enable = true" or something like that

  • @StaffyDoo
    @StaffyDoo 2 месяца назад +1

    This pill is gold! 🙌

  • @GeorgeGzirishvili
    @GeorgeGzirishvili 7 месяцев назад +8

    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. 😃

  • @m4rt_
    @m4rt_ 7 месяцев назад +1

    ... this makes me want to try out nix.
    I'll try it when I eventually get myself a new laptop.

  • @rafi_45
    @rafi_45 7 месяцев назад +1

    thank you so much for helping us to move configuration to flake.

    • @caddr
      @caddr 7 месяцев назад

      Nice

  • @blicero10979
    @blicero10979 6 месяцев назад +3

    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  6 месяцев назад +2

      Yeah, I fixed it in the repo, but unfortunately, I cannot edit the video.

    • @blicero10979
      @blicero10979 6 месяцев назад

      @@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 Месяц назад +1

      @@vimjoyerjust add a text pop up with the correction

  • @harinho6117
    @harinho6117 7 месяцев назад +3

    Estava pensando em começar a usar essa distro, essa é uma boa oportunidade começar

    • @vimjoyer
      @vimjoyer  7 месяцев назад +1

      👍

    • @Redyf
      @Redyf 7 месяцев назад +1

      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.

  • @authenticLC
    @authenticLC 6 месяцев назад +2

    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.

  • @Elristan
    @Elristan 4 месяца назад +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

  • @brunek1322
    @brunek1322 4 месяца назад +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  4 месяца назад

      Yeah, I hear that quite often. I'm still learning to maintain a good pace

  • @JellyfishJellyfish-bk7cr
    @JellyfishJellyfish-bk7cr 5 месяцев назад +1

    Sub earned

  • @untitled8027
    @untitled8027 2 месяца назад +5

    all i got was a ton of errors. nix is a pain in the behind. wish the docs were clearer.

  • @KristjanKask
    @KristjanKask 7 месяцев назад +1

    Before watching. No way! How are you gonna do this in 15min???
    After watching. Wow, great job!

    • @vimjoyer
      @vimjoyer  7 месяцев назад

      I couldn't fit everything in, but the most essential parts to get a working system are there.

  • @erichanson5628
    @erichanson5628 7 месяцев назад +2

    Thank You!!!

    • @vimjoyer
      @vimjoyer  7 месяцев назад

      You are welcome!

  • @user-gy4kv4km8f
    @user-gy4kv4km8f 7 месяцев назад +1

    goated

  • @redm00n748
    @redm00n748 3 месяца назад +2

    i did not know father made linux tutorial

  • @robosergTV
    @robosergTV 3 месяца назад +3

    Дякую.

  • @richardbennett4365
    @richardbennett4365 7 месяцев назад +1

    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?

  • @user-yz1kx8zp2r
    @user-yz1kx8zp2r 7 месяцев назад +3

    Дякую!

    • @vimjoyer
      @vimjoyer  7 месяцев назад +1

      Будь ласка!

  • @user-fr6tb2ey8s
    @user-fr6tb2ey8s 5 месяцев назад +1

    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

  • @jawuku3885
    @jawuku3885 7 месяцев назад +1

    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";

  • @eduardabramovich1216
    @eduardabramovich1216 Месяц назад +3

    could you make a tutorial on how to customize zsh with detail using home-manager?

  • @abdullamasud4278
    @abdullamasud4278 6 месяцев назад +1

    can you make a tutorial on cron job in nixos please? I find it quite hard to implement

  • @sethm7761
    @sethm7761 5 месяцев назад +2

    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  5 месяцев назад +1

      Use --flake for rebuilds. Non--flake version will use system's nixpkgs channel and won't include any modules you imported in your flake.

  • @RealJonzuk
    @RealJonzuk 2 месяца назад +8

    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

    • @Ziggurat1
      @Ziggurat1 4 дня назад +1

      Instructions unclear, trip is over and now templeos is installed on both my gaming pc and my work laptop...

  • @panzerthetank
    @panzerthetank 7 месяцев назад +1

    gruvbox

  • @xorlop
    @xorlop 7 месяцев назад +1

    Rejoice! A video I can send to my ffriends :)))))

  • @budiardjo6610
    @budiardjo6610 Месяц назад +3

    i am try to read nix doc, watch some nix conference. but still couldn't achive this whole understanding.

  • @user-fr6tb2ey8s
    @user-fr6tb2ey8s 4 месяца назад +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?

  • @rl-bw5cm
    @rl-bw5cm 6 месяцев назад +2

    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  6 месяцев назад +1

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

  • @dennis1790
    @dennis1790 2 месяца назад +2

    Do I still need to add home-manager package in system packages with this approach? I cannot run 'home-manager' commands

    • @vimjoyer
      @vimjoyer  2 месяца назад +1

      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

  • @davidjeters
    @davidjeters 7 месяцев назад +2

    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  7 месяцев назад +2

      Probably zsh

    • @HiAdrian
      @HiAdrian 5 месяцев назад

      You can also use nvim as a pager btw (PAGER="nvim +Man!"), which is much nicer imo, since all familiar controls are available.

  • @rishabarora9269
    @rishabarora9269 4 месяца назад +2

    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  4 месяца назад

      They are safe to delete with this setup. You can regenerate them any time with `home-manager init`.

    • @rishabarora9269
      @rishabarora9269 4 месяца назад

      @@vimjoyer thank you!

  • @jtfidje
    @jtfidje 7 месяцев назад +1

    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  7 месяцев назад +1

      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 7 месяцев назад

      @@vimjoyer thx!

  • @rishi2504
    @rishi2504 6 месяцев назад +2

    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  6 месяцев назад

      yes, I made a mistake while editing the video

  • @Euphorya
    @Euphorya 5 месяцев назад +1

    Are there any recommended guides on installing Nix with disk encryption?

    • @vimjoyer
      @vimjoyer  5 месяцев назад +1

      NixOS wiki includes a couple of links at the bottom:
      nixos.wiki/wiki/Full_Disk_Encryption

  • @georgeanastasiou2680
    @georgeanastasiou2680 Месяц назад +1

    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  Месяц назад +1

      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

  • @mastermonday
    @mastermonday 4 месяца назад +1

    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  4 месяца назад

      If you are using git, make sure to add all changes before rebuilding. flakes don't see unstaged directories and files.

  • @felixjohnson3874
    @felixjohnson3874 4 месяца назад +1

    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  4 месяца назад +1

      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

  • @goofansu
    @goofansu 7 месяцев назад +2

    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  7 месяцев назад +2

      I'm using a Lenovo Legion 5 laptop with RTX 3060 and and cpu

  • @nikoraasu6929
    @nikoraasu6929 7 месяцев назад +1

    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

  • @micycle8778
    @micycle8778 3 месяца назад +1

    is it safe to use the configuration.nix file to reproduce a nix install if the `system.stateVersion`s are different?

  • @RyanJensenEE
    @RyanJensenEE 4 месяца назад +1

    What software do you use to generate the animated transitions between different versions of text files?

    • @vimjoyer
      @vimjoyer  4 месяца назад

      motion canvas

  • @kayachan5198
    @kayachan5198 6 месяцев назад +1

    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  6 месяцев назад +1

      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.

  • @user-mv3gr5cd6n
    @user-mv3gr5cd6n 6 месяцев назад +1

    Дякую! Крутий контент! Круто було якби плейлист був також на Українській 😊

    • @vimjoyer
      @vimjoyer  6 месяцев назад

      Чесно кажучи, звук для мене - найскладніша частина, тому для запису двох треків знадобилося б занадто багато часу

  • @KarstenFinderupPedersen
    @KarstenFinderupPedersen 7 месяцев назад +1

    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  7 месяцев назад

      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 7 месяцев назад +3

      ​@@vimjoyerYou can also just use self directly as well no?

    • @KarstenFinderupPedersen
      @KarstenFinderupPedersen 7 месяцев назад +2

      Thanks I will do that :)

    • @vimjoyer
      @vimjoyer  7 месяцев назад

      @@benign4823 of course

  • @DavidLindes
    @DavidLindes 4 месяца назад +1

    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  4 месяца назад +2

      ls is aliased to eza on this screenshot, but in newer videos I'm using video editing magic for this.

    • @DavidLindes
      @DavidLindes 4 месяца назад

      @@vimjoyer cool, I'll check it out. (I also found els, which I guess is similar.)

  • @lethaltty
    @lethaltty 26 дней назад +2

    Can I easily migrate if I'm currently managing my dotfiles with yadm on a regular distro ?

    • @vimjoyer
      @vimjoyer  26 дней назад

      Never heard of yadm, but you can probably use it on NixOS and gradually switch to nix if you want

  • @cryptokrupt
    @cryptokrupt 5 месяцев назад +1

    What theme do you use for your code? It looks awesome!

    • @vimjoyer
      @vimjoyer  5 месяцев назад

      Everything you see in this video is done with motion canvas.

  • @mechan1sm_
    @mechan1sm_ 4 месяца назад +1

    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  4 месяца назад

      🤷‍♂️

  • @setaindustries
    @setaindustries 4 месяца назад +1

    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  4 месяца назад +1

      use `home-manager.extraSpecialArgs`

    • @setaindustries
      @setaindustries 4 месяца назад

      ​@@vimjoyerThanks, will try!

  • @luqmaanmohideen8422
    @luqmaanmohideen8422 7 месяцев назад +3

    ur def from the bulkans /eastern eu

  • @grandpaspoopsock
    @grandpaspoopsock 5 месяцев назад +1

    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  5 месяцев назад

      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.

  • @eduardabramovich1216
    @eduardabramovich1216 Месяц назад +3

    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  Месяц назад +1

      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!

    • @X_Otman
      @X_Otman Месяц назад

      Can you tell me if its worth it to switch Form arch to nixos.

    • @eduardabramovich1216
      @eduardabramovich1216 Месяц назад +2

      @@X_Otman I still run Arch as my main distro, but I play with NixOS in a virtual machine. I have to say that I'm impressed. The tthings you can do and how you can replicate them so easily, it's awesome.
      I'm planning to switch in the next weeks, just need to backup some files. That said, the first week learning Nix was really difficult, and I still don't fully grasp everything, it's a massive rabbit hole, but i think it's worth the price.

    • @X_Otman
      @X_Otman Месяц назад

      @@eduardabramovich1216 Thanks alot for the info, im gonna start learning it. =)

  • @NathanMautz
    @NathanMautz 5 месяцев назад +1

    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  5 месяцев назад

      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.

  • @Jack-ht7hz
    @Jack-ht7hz 6 месяцев назад +1

    Im having problem adding hosts cannot no file or directory. It only works if a rename it to default

    • @vimjoyer
      @vimjoyer  6 месяцев назад

      If you are using git make sure to add all files, flakes don't see unstaged files

    • @Jack-ht7hz
      @Jack-ht7hz 6 месяцев назад

      @@vimjoyer yes that was it thanks for the help!

  • @BlueskyFR_
    @BlueskyFR_ 5 месяцев назад +1

    Hey, I don't have the `man home-configuration.nix` command working after following the video. What can I do?

    • @vimjoyer
      @vimjoyer  5 месяцев назад

      Check if your home-manager module is enabled and home-manager itself is working

    • @Anonymous4045
      @Anonymous4045 5 месяцев назад

      You have to rebuild before you can use the manpage.

  • @richardbennett4365
    @richardbennett4365 7 месяцев назад +1

    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  7 месяцев назад +1

      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 7 месяцев назад

      ​@@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 7 месяцев назад

    What is the relationship between a channel url and the nixos/nixpkgs/nixos-unstable url?

    • @vimjoyer
      @vimjoyer  7 месяцев назад

      repo owner on GitHub / repo name / branch or commit

    • @vimjoyer
      @vimjoyer  7 месяцев назад

      Repo owner on GitHub / repo name / branch or commit

  • @jorge28624
    @jorge28624 7 месяцев назад +2

    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  7 месяцев назад +1

      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

  • @user-ge7qx9ti1s
    @user-ge7qx9ti1s 5 месяцев назад +1

    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  5 месяцев назад +1

      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 5 месяцев назад

      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 5 месяцев назад +1

    Вітання))

  • @apexcodes
    @apexcodes 4 месяца назад +77

    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  4 месяца назад +15

      You can put your entire configuration in the flake.nix btw (cursed)

  • @mactemporal1980
    @mactemporal1980 5 месяцев назад +1

    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  5 месяцев назад +2

      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 4 месяца назад +1

      @@vimjoyer Ok but I can still put all the softwares configs in configuration.nix if I want?

    • @godminnette2
      @godminnette2 4 месяца назад +2

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

  • @kartikgupta9117
    @kartikgupta9117 5 месяцев назад +1

    the terminal theme looks pretty , where can i get that on ubuntu

    • @vimjoyer
      @vimjoyer  5 месяцев назад

      Colorscheme is called gruvbox, and the prompt is just a custom PS1

  • @DeuxisWasTaken
    @DeuxisWasTaken 4 месяца назад +1

    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.

  • @MalwarePad
    @MalwarePad 4 месяца назад +2

    Which ohmyzsh theme are you using?

    • @vimjoyer
      @vimjoyer  4 месяца назад

      I don't use ohmyzsh

    • @MalwarePad
      @MalwarePad 4 месяца назад

      ​@@vimjoyeroooh, okay. I really like that prompt, mind sharing your dotfiles or something?

  • @Ikxi
    @Ikxi 5 месяцев назад

    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  5 месяцев назад

      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

  • @overthevistas
    @overthevistas 4 месяца назад +1

    Could anyone please tell me what font he is using

    • @vimjoyer
      @vimjoyer  4 месяца назад

      Jetbrains Mono NerdFont

    • @overthevistas
      @overthevistas 4 месяца назад

      @@vimjoyer Thank you so much! Great video btw!

  • @harsh.w
    @harsh.w 26 дней назад +2

    what theme is that?