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/ - Наука
Masterful work as always Ioga! Can't wait for the upcoming videos!
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!
i switched to nix after bricking grub on my arch install. really loving it so far!
How do you brick grub lmao
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
@@LP-cn6hv noob
@@schizofren_iastfu ur brain literally shows u shit that doesn't exist
@@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.
Configuring NixOS is really fun! As a Linux theming enthusiast it is my favorite distro.
Every new Nix/NixOS user must watch this video, great job Ioga 🐧❄
Glad you think so!
I definitely think NixOS is the future of how Linux works, yet it still is crippled by needing FHS patches per app.
For sure, we’re just not there yet
Shut up endeavouros user
Really nice and clear, good video!
Thanks!
Just curious, what color scheme and font is used in this video? it looks really nice!
Catppuccin mocha and JetBrains Mono
@@IogaMaster actual best combo to ever exist
bro great video. Just curious tho, how do you edit your videos
Using motion canvas.
github.com/IogaMaster/videos
oh thanks bro
@@IogaMaster So you do have to code to make the video ryt?
Yeah
@@IogaMaster thats suck cuz i dont know howe to code😂
You lost me at the part about poor documentation being a part of the nixos experience. Thanks, but no thanks 😅
Understandable
Make a video how to contribute to nixpkgs, like how to test your changes etc.
ruclips.net/video/3hMIqxbQBRM/видео.htmlsi=tOW_x1sJB4QMHJEA
Already did! 😄
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.
Give it a shot only when you’re ready
cool video
What’s the benefit of this over using Ansible?
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
Sounds like I need to get Flaky with Flakes on nixOS.
Indeed you do
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.
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.
@@IogaMaster Thank you. I have no friends who are deep into Linux so this helps.
I use nix for development tools, not need nixos because learning curve is high
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
Yes to all.
The link to join my discord is in the description
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.
Good old HARPA AI, thanks for the recap!
@@IogaMaster I am happy stupidity is not painful.
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
For sure, takes some time to really get used too. I think it was worth it in end.
What's OOT?
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.
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.
Yep, that's sounds right, another OS for OS tinkerer. Guess I have to try Mint or stick with windows.
Mint, Pop_OS and Fedora are all great stable options
I dont feel comfortable using flakes as long as they are still experimental.
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.
wdym by using nix as a development tool?
Nix can work as a build system and set up portable development environments.
Basically spend time to learn it. This is not cereal flakes.
Very complex and difficult to use
It also does not follow Linux standards
The only way to innovate is to break convention
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.
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.
@@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.
catpuccin?
Yeah!
@@IogaMaster nice
its the default colors for my system and every single webpage im on
I had a quick go, but gave up.
Try, try and try again
@@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.
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
@@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.
wait what i know you from github, you can't just be on RUclips, that's illegal
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
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
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.
@@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)
Sounds like skill issue m8
@@SonOfMeme uh-huh
I hope it's not the future and just as alternative.
If you need to learn it, the future is dire
Why is it dire
@@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.
That's a bit like saying the future is dire because you should know how Git works.
@@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
@@colbyboucher6391 the future is dire because I have to learn 2+2=4
it's so harrrdd 😂that's what he sounds like
you talk too fast
I don't add music anymore, so you can slow the video down if you need. Thanks for the feedback!
no, you just listen too slow.