HOW to REALLY learn NixOS

Поделиться
HTML-код
  • Опубликовано: 16 июн 2024
  • In this video I show you the way I should have learned Nix/NixOS
    ko-fi: ko-fi.com/iogamaster
    Discord: / discord
    Resources:
    nixos-and-flakes.thiscute.world/
    zero-to-nix.com/
    nix.dev/
    • NixOS Intro - Installa...
    • NixOS Introduction - H...
    • NixOS Introduction - N...
    determinate.systems/
    docs.nix.zone/
    Links:
    search.nixos.org
    mipmip.github.io/home-manager...
    github.com/lecoqjacob/manix (This is a working fork, the original was abandoned)
    github.com/nixos/nixpkgs
    / discord (NixOS)
    / discord (Vimjoyer)
    Chapters:
    0:00 Intro
    0:22 Monolithic Configuration
    0:38 Flakes
    1:11 home-manager
    1:27 The Learning Pathway
    2:57 Finding options and functions
    3:51 Miscellaneous & Conclusion
    4:30 Outro & Thanks
    My videos are open source!
    github.com/IogaMaster/videos
    Software I Use:
    🗒️ Neovim: github.com/IogaMaster/neovim
    🧮 MotionCanvas: motioncanvas.io/
  • НаукаНаука

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

  • @kinzoku-dev
    @kinzoku-dev 6 месяцев назад +7

    Masterful work as always Ioga! Can't wait for the upcoming videos!

  • @wojtekkrupski8583
    @wojtekkrupski8583 6 месяцев назад +35

    While reproducibility is a valuable feature, I consider the reusability and localized configurations in NixOS as the most powerful aspects for me as a user (not DevOps). Continuously enhancing configurations to suit specific requirements, along with effortless rollbacks and deployment on other machines, are truly remarkable!

  • @rishabhshah8754
    @rishabhshah8754 6 месяцев назад +56

    i switched to nix after bricking grub on my arch install. really loving it so far!

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

      How do you brick grub lmao

    • @LP-cn6hv
      @LP-cn6hv 16 дней назад

      Same for me, I always wanted to try nix, but never really touched the VM I created to do so. Then I bricked my GRUB and thought like "ye, why not try nix now that I need to fix my system anyways". My Arch wasn't even damaged, only the GRUB, but I wanted to try it anyways so I did

    • @schizofren_ia
      @schizofren_ia 16 дней назад

      @@LP-cn6hv noob

    • @eobardthawnemcoc
      @eobardthawnemcoc 15 дней назад

      ​@@schizofren_iastfu ur brain literally shows u shit that doesn't exist

    • @adamk.7177
      @adamk.7177 9 дней назад

      @@schizofren_ia bricking grub is not shameful. It means they were attempting to do something complicated enough that they were messing with their grub configuration files. If you haven't learned how to brick grub, I'm betting you haven't learned how to fix a bricked grub either. You only learn that after you brick it a few times and decide you are sick of reinstalling your entire OS. Compensating for lack of your knowledge by calling other people noobs for not being afraid to break stuff is not a replacement for that lack of knowledge.

  • @callyral
    @callyral 11 дней назад +3

    Configuring NixOS is really fun! As a Linux theming enthusiast it is my favorite distro.

  • @Redyf
    @Redyf 6 месяцев назад +14

    Every new Nix/NixOS user must watch this video, great job Ioga 🐧❄

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

      Glad you think so!

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

    I definitely think NixOS is the future of how Linux works, yet it still is crippled by needing FHS patches per app.

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

      For sure, we’re just not there yet

    • @chonkydog6262
      @chonkydog6262 19 дней назад

      Shut up endeavouros user

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

    Really nice and clear, good video!

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

    Just curious, what color scheme and font is used in this video? it looks really nice!

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

      Catppuccin mocha and JetBrains Mono

    • @kinzoku-dev
      @kinzoku-dev 5 месяцев назад +5

      @@IogaMaster actual best combo to ever exist

  • @kb24.mp3
    @kb24.mp3 3 месяца назад +1

    bro great video. Just curious tho, how do you edit your videos

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

      Using motion canvas.
      github.com/IogaMaster/videos

    • @kb24.mp3
      @kb24.mp3 3 месяца назад +1

      oh thanks bro

    • @kb24.mp3
      @kb24.mp3 3 месяца назад +1

      @@IogaMaster So you do have to code to make the video ryt?

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

      Yeah

    • @kb24.mp3
      @kb24.mp3 3 месяца назад +1

      @@IogaMaster thats suck cuz i dont know howe to code😂

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

    You lost me at the part about poor documentation being a part of the nixos experience. Thanks, but no thanks 😅

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

    Make a video how to contribute to nixpkgs, like how to test your changes etc.

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

      ruclips.net/video/3hMIqxbQBRM/видео.htmlsi=tOW_x1sJB4QMHJEA
      Already did! 😄

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

    I really want to use this OS, but it conflicts with Julia's plotting packages. I'm 90% sure there is a fix for this, but I just don't have the experience to solve it on my own and the start of the academic semester is approaching. I think I'll leave learning Nix for later.

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

      Give it a shot only when you’re ready

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

    cool video

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

    What’s the benefit of this over using Ansible?

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

      Ansible is repeatable, not reproducable.
      Which means two nixos installs of the same config are IDENTICLE down to the bit.
      Ansible is also configured with yaml. Which is not a Turing complete language. Nix however is, leading to much more flexibility

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

    Sounds like I need to get Flaky with Flakes on nixOS.

  • @VegascoinVegas
    @VegascoinVegas 24 дня назад +1

    I saw instruction for how to build my first flake. It showed me ever last word and punctuation. It worked. But now I am confused because I am learning how to use plural "flakes"Do I add the code for other flakes into the flake.nix I already started? Or does each program need it's own flake.nix containing folder?
    I wanted to use a flake and "rustup" because I thought the flake would keep rust up to date for me. But those instructions require a file called shell.nix. So I think rust can't be a flake. Flakes use flake.nix. When I try to use the Nix version of rust I get a message I need the more recent update. The custom Nix Rust didn't work with others.

    • @IogaMaster
      @IogaMaster  7 дней назад +1

      A flakes inputs are directives to other flakes .
      A flake can do everything shell.nix can and more.
      I made a simple rust flake for the nix-community org.
      To use it just run:
      “nix flake init -t github:nix-community/templates#rust” in an empty directory. It will tell you how to get started and add a license.

    • @VegascoinVegas
      @VegascoinVegas 6 дней назад +1

      @@IogaMaster Thank you. I have no friends who are deep into Linux so this helps.

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

    I use nix for development tools, not need nixos because learning curve is high

  • @comosaycomosah
    @comosaycomosah 12 часов назад +1

    damn son i love your pfp i may have to have someone make me something similar lol youre videos are great bro i may join your discord

    • @IogaMaster
      @IogaMaster  8 часов назад

      Yes to all.
      The link to join my discord is in the description

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

    0:00 ⚙ NYX OS allows customization at an extensive level, managing all aspects of machines in a functional language called NYX.
    0:20 🧱 Monolithic Configuration is the simplest method, using two files recommended in the manual.
    0:39 🌟 Flakes offer a more advanced way to configure NYX OS, ensuring reproducibility with pinned inputs.
    1:09 🏠 Home-manager enables managing user files in the home directory separately, integrated with NYX OS or independently.
    1:27 🛠 Learning Pathway for NYX OS involves starting as a development tool, contributing to packages, then diving into configurations.
    2:41 💻 Experimenting with NYX OS in a virtual machine helps understand its functionality before deploying it on real hardware.
    2:54 📚 Finding options and functions in NYX OS can be challenging; various resources, including web searches and community support, aid in this.
    3:51 🛠 Miscellaneous tools like reppel, NYX OS rebuild, and snowfall ease debugging and configuration creation.
    4:26 🔄 NYX OS's potential spans from Docker deployments to micr VMs; the best way to assess it is through several months of use.

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

      Good old HARPA AI, thanks for the recap!

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

      @@IogaMaster I am happy stupidity is not painful.

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

    I tried it, but even as a linux user for decades, it was really not good at all. Sure, it can probably be set up to be nice to use, but OOT it was terible. Nix package manager is nice though

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

      For sure, takes some time to really get used too. I think it was worth it in end.

    • @Rikaisan
      @Rikaisan 10 дней назад

      What's OOT?

  • @finhas8865
    @finhas8865 27 дней назад +1

    I'm just a computer user. I want to use my computer for work and looking for an alternative to windows.
    So much videos praising nixOS, but little showing how it's used for average users. Almost every videos talking about configurations and package manager, which I, as an average user neither have an idea about, nor really interested in that.
    Oh, well that probably means that in terms of usability for average users, nixOS is just another Linux distro.

    • @IogaMaster
      @IogaMaster  27 дней назад

      Yeah, it's a little more difficult than a traditional distro. You make a tradeoff, control over ease of use.
      Depends on your goals, but in general if you don't know if you need nixos, you don't need it at all.

    • @finhas8865
      @finhas8865 27 дней назад +1

      Yep, that's sounds right, another OS for OS tinkerer. Guess I have to try Mint or stick with windows.

    • @IogaMaster
      @IogaMaster  27 дней назад

      Mint, Pop_OS and Fedora are all great stable options

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

    I dont feel comfortable using flakes as long as they are still experimental.

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

      Flakes are the standard, they are only experimental due to some drama between people in the nix team. I can assure you there are no issues.

  • @user-vw2qt8vp8e
    @user-vw2qt8vp8e Месяц назад

    wdym by using nix as a development tool?

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

      Nix can work as a build system and set up portable development environments.

  • @fuzzy-02
    @fuzzy-02 2 месяца назад +1

    Basically spend time to learn it. This is not cereal flakes.

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

    Very complex and difficult to use
    It also does not follow Linux standards

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

      The only way to innovate is to break convention

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

    NixOS is really cool but its really not for everyone, the average user doesnt really want to write a config for their system in text.

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

      For sure, I have always loved tinkering. I have been that way since I was a kid. NixOS is a sandbox of infinite possibility. If you just want things to work nixos wouldn’t be a good choice.

    • @joshuarobert7192
      @joshuarobert7192 16 дней назад

      @@IogaMaster > If you just want things to work nixos wouldn’t be a good choice.
      I entered the world of linux primarily for privacy and security. Years down the line, I'm using NixOS as my primary OS. It's not really required for you to tinker all day with it, it can be setup to "just work".
      Honestly, it's much more easier for someone not too knowledgeable about tech, because other people have made Nix packages and options to achieve what you want. What I think is severely lacking for beginner/low-tech NixOS users is the wiki. Too terse at time, others vague to the point of uselessness.

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

    catpuccin?

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

      Yeah!

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

      @@IogaMaster nice
      its the default colors for my system and every single webpage im on

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

    I had a quick go, but gave up.

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

      Try, try and try again

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

      @@IogaMaster Some questions:
      How do I bundle all my custom scripts up into a package that nixos can find and install via its system? Or otherwise grab the git repo and set up a few symlinks?
      What about configuring apache2 (I know what works in Ubuntu, so how to translate to nixos?)
      Adding arbitrary lines to the sudoers file?
      Getting contents of hosts file from off the network (my mesh network's dns sucks, so I assign everything static ips and then maintain a hosts file for the LAN, so I want to download a list of hosts files, and append that to an otherwise pristine /etc/hosts)?
      Likewise how do I get /etc/ethers from a location on the network?
      How do I get it to grab my vim and nvim configs via git, and then symlink them into place?
      How do I tell it to grab oh my zsh and add my custom theme?
      And symlink the bashrc out of that pile of custom scripts (so that the .bashrc is managed by a git repo -- the same bashrc is used with linux, mac, cygwin and wsl, so using nix to manage it is not an option as I'd have to install nix everywhere, and in some cases installing nix is not an option, so the only dependency we can have here is git).
      What about creating python venvs shared between multiple users? Or a personal python venv?
      And how to tell nixos what python packages to install in said venvs? (A shared venv so that I create one, administer from one user, but all users can use the same venv. I don't want to have to do multiple nix rebuilds to install a package.)
      How to I tell it how to set up my tmux conf? (That is, grab a git repo, and then symlink the .tmux.conf out of it, again so that it is managed by git, again git is the only dependency, as I can't put nix everywhere.)
      What about keyboard shortcuts and other config for KDE?
      That's my shopping list of things I couldn't figure out how to do the nixos way.

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

      Most of these require some context I dont have.
      If you would like I can help you during a mentoring session:
      ko-fi.com/s/50c066295b

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

      @@IogaMaster I'm probably not going to try nixos again for a while. But that's the sort of shopping list of problems I came up against, and couldn't figure out after googling around. I have no real need for what nixos offers, and Kubuntu works fine for my use case, so I'll stick with that for now and keep an eye on nixos from afar.

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

    wait what i know you from github, you can't just be on RUclips, that's illegal

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

      Ikr, I was talking to one of the nushell devs when I realized I had watched is RUclips videos already. Didn’t know it was the same guy

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

    Yeah, no. Every video I see immediately delves deep into the weeds, spewing a bunch of Nix terminology as if I already have it installed. Here’s how my path with learning Nix went:
    1. I figured I’d install it on my machine and start experimenting with config files, slowly learning it, then switch to flakes, splitting config into multiple files, etc
    2. I booted up the image, launched the installer
    3. Saw no way to enable full-disk encryption during installation
    4. Googled for 10 minutes through “oh yeah, you just gotta know how to do it, here’s 10 commands with variations depending on your setup” threads
    5. Gave up

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

      This video was targeted at users of nix who wanted to cleanly transition into using nixos.
      Full disk encryption is more of an advanced topic (the installer was added last year, so it woulden't be available), searching github for other config's might have helped.
      As far as the "you just gotta know how to do it", it depends on how you phrase your question. The way nix works is VERY flexible, so people need quite a bit of context to give you an answer fully. So you need to use their snippets and advise to figure out the answer for yourself.
      Keep trying, I have been using nixos for over 2 years and can honestly say it was the best choice i ever made in tech.

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

      @@IogaMaster I don’t consider full disk encryption to be an advanced topic, it should be an out of the box option during installation. If the tech creates more problems for me than it solves them (which seems like it will definitely be the case considering poor documentation and the amount of different ways to do the exact same thing) then it’s just not worth my time. I‘ll just wait for it to get better (or to die out, whichever comes first)

    • @SonOfMeme
      @SonOfMeme 20 дней назад

      Sounds like skill issue m8

    • @MrGrayNk
      @MrGrayNk 20 дней назад

      @@SonOfMeme uh-huh

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

    I hope it's not the future and just as alternative.

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

    If you need to learn it, the future is dire

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

      Why is it dire

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

      @@IogaMaster an OS should be generally straightforward to use. imagine it like this, if you're a carpenter you don't want to build your own hammer and wrench, you'd rather purchase them reliably from one place and do general maintenance on your tools once in a while so you can instead focus on being a carpenter.
      there's a reason why people use Arch a lot more now, because it's easier to use and doesn't need much learning (and whatever you need to know about arch can be found on the wiki or by asking chatgpt lol). i saw your other comment say that using nix is close to being like a part time job, that doesn't sound like a good thing though.

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

      That's a bit like saying the future is dire because you should know how Git works.

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

      @@colbyboucher6391 i think its a bit different though. git is presented as easy to learn and there's not much of a learning curve (its like learning how to use a mouse). nixos isn't actually that hard but it's not good that its been given this reputation of being hard and needing effort to learn. the reputation of being hard and needing learning will scare people away

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

      @@colbyboucher6391 the future is dire because I have to learn 2+2=4
      it's so harrrdd 😂that's what he sounds like

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

    you talk too fast

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

      I don't add music anymore, so you can slow the video down if you need. Thanks for the feedback!

    • @fokas.automotive4768
      @fokas.automotive4768 3 месяца назад +3

      no, you just listen too slow.