I mean yeah even if the nix makes the software setup reproducible differences in the computer setup itself could still result in it not working on another machine in edge cases
Nix long time user and Haskell programmer here, welcome to the rabbit hole where you cannot edit your system files directly like you used to, if no one has wrapped it you must learn the functional language to change a simple parameter in your config, and we’ll all benefit from it! It’s a trap to force everyone learning functional programming, there’s no escape! You’re welcome!
God i love NixOS, i spent a week writing a derivation and service for a weird 13 year old hardware driver and it now just works on all of my machines forever
Yeah that's exactly how I feel. I spent a significantly long time figuring how to do this weird spotify mod (spicetify) and it took me sooo long to figure it out, but now that I've got it done, nixos is the only OS where this thing reliably works because it's just declared all the same and is never messed up by system updates
the most important word in that sentence is "week". nixos is great when you edit a config and it just works, but when it doesn't, be prepared to spend TIME digging through untold layers of abstraction
@dotanuki3371 admittedly a good amount of that week was actually learning how nix derivations work so it would be much quicker if I did something else like that now, but the majority of that time was actual program config and service writing that you'd need to do on any system. The nice thing though is I never need to touch it again, whereas with other systems I'd be starting mostly from scratch every time since I'd forget how I did it. Learning nix is the hard part, but using nix isn't too bad
NixOS in a nutshell: - You can't change anything with commands anymore, non-FHS compliant means you can't even install binaries and expect them to work - Everything has to be done through the config so you better hope there's an option for it or you'll have to learn how to code up that option yourself. - But also has the most expansive collection of packages (Rivals and in some cases BEATS the AUR in package availability) - Documentation SUCKS - Even without the fact that you can undo changes like installing DEs at an instant, it's solid as a rock because it's all configuration, it'll just refuse to make your new configuration rather than accepting your command to break your system, NEVERhave an unbootable system AGAIN. - What does this error message mean why can I not find anything online for this - Best part is that ALL your changes are just LISTED there in a plain text file so you can just read it, leave comments, and just have living documentation of every single change you've made to your system. Congrats, it's really your system now.
fairly new (6 months ish) nix-darwin user here (just love my macbook too much to go full nixos), it's unbelievable to me how bad the nix docs are. especially for flakes, which as far as i can tell, there is no reason to not use flakes if you're new
This Video is a great example of why nix is so hard to learn for beginners. Multiple concepts/workflows are blended together when talking about abstract concepts. NixOS != nix != nixpkgs, mainly because "nix" is actually multiple different things (a functiobal programming language and a package manager that can interpret it). Nix can be used without NixOS (btw.) and the configuration.nix file is only used on NixOS. Independent from the OS, there are many different ways to "use" packages: - nix run - nix profile ( / nix-env) - nix shell - nix develop (if you are using nix flakes, which are more or less just a scheme for organizing nix code) Still a good video, even if it is not perfect and im happy to see nix getting some attention ❤
Switched to NixOS a few years ago now and it's incredible! Feels like a next-gen OS in many ways. You didn't mention what I think is one of the coolest features: nix-shell -p somepackage - you can temporarily have any package up and running to do that one thing that one time, without the need to install it or deal with the cruft left over from said random installations over years of use. Fantastic!
@@tanawatjukmongkol2178 feels next gen though, it's just a hard idea to grasp. It needed some time to grow up, it's an OS after all. It even predates docker.
NixOS walks a fine line between frustration and purely amazing. But everyone be careful: once you have got sucked into NixOS it's tough to go back. Despite all the pain.
was a bit too much of a hassle for my taste. stopped using nix package manager on my phones some years back. tried again on my steamdeck but ultimately went back to compiling stuff myself
@@ImperiumLibertas Agreed. It allows you to dip your toes in and learning without relying on it too much. Also, writing a shell.nix or flake.nix for your projects can make it so much easier for other developers to have the same environment, that's a very powerful thing to try out as well without having to install a different distro.
been using it for a year now, the downside is that the more you find out you can do, the more you get inside a rabbit hole with zero documentation that'll make you forget you have actual work to do (as any niche linux distro)
nix in 1 sentence : linux but all your configs are stored in a text file which you can use everywhere and not worry about setting up your system ever again feat fancy shit you'd probably never use but can still flex on reddit about it
A nice side-effect, is that if you own multiple machines, just have to sync to files up with vcs, and nixos-rebuild switch, and there you go, same setup everywhere. ( with home-manager makes it even better )
@@marusdod3685 as someone who's used it, it's not. You have a full programming language to mess with for your configs. JSON, YAML, XML are just static data, key value at the end of the day. NixOS has so many abstractions and moving parts it can confuse even the most hardcore functional programmer which none of us are.
been using nix as my daily driver for like 5 years! i love it, just hate when you have to write your own nix package for whatever niche program you're trying to run.
I firmly believe it's just a matter of time before we get a fully graphical nix configuration editor. Just push the right buttons and check the right boxes, all generic linux options can be defined without writing a single line of code. That's sufficient for most users.
Except that all the config files are in the same place and if you don't understand an option you can go see for yourself what it's doing under the hood through nixpkgs
Just got started with NixOS last week myself, and I'm pretty happy with it so far. First time setup is a bit of a pain, especially if you're not used to the workflow, but I really enjoy a lot of the benefits that come with the declarative setup.
I agree with your take on the power and utility of the NYX package manager. It is indeed a game-changer when you can have a deterministic and reproducible system configuration.
This reproducible and declarative way of configuring your system is interesting because it allows for feature modularity without having to worry about system's state For example, consider a program which uses python to work, if you install in your machine, you need to certify that you have the needed python version, but what if another program needs an older version of python With Nix, you simply add to your package list or configure it using modules, which are literally code snippets that you can send to other people and it will work too
Not covered by Fireship, but the Nix ecosystem is full of tools and modules to configure a lot of things: - Home manager: allows to use one language (Nix) to configure all your dotfiles in your home dir - Disko: Extend the declarative way for partitioning and formatting your drives (with support for ZFS, BTRFS and other file systems) - Impermanence: Modules for an immutable system to declare which files and folders to persist between boots - Arion: docker compose but with nix the standard nixpkgs also has modules for a lot of things, even configuring minecraft servers on it
@@TheCamps10 i mean nix is a package manager, operating system AND a programming language so they're technically correct i guess (but you can still easily make syntax errors in nix, i think what they're referring to is the ability to rollback to previous versions of the system)
Ive been using nix on macbook for many years, eventually i got the option to use Linux again and installed NixOS - i have never been happier with my machine
I've been using NixOS for months now. And this is home. The only other OS I'll use is Arch. Couldn't care less about Windows or the distro hopping nonsense on Linux (aka Debian with a different spray paint)
@@rafal9ck817Better I'd say. Nixpkgs has about the same, even a little more, packages than the aur. Also many programs like hyprland are directly configurable from the configuration.nix.
@@rafal9ck817 Both are great. Arch is more stable than what most people will tell you. When it comes to Window Managers. Hyprland. nuff said. First class support on NixOS and Arch
@@rafal9ck817 I have been wondering the same thing and hyprland seems to work really well on it from what I've read. I think the last census showed about 25% of hyprland users were using NixOS, so there'll be good support and documentation. I don't know about what other WM / Wayland compositors would be a good pick for Nix.
Just moved from Mint to NixOS yesterday, it's really good in my opinion, doesn't come with bloat and currently idle it uses less resources than Mint Xfce.
@@GSBarlev Jovian-NixOS mixes SteamOS with NixOS. I'm daily driving it right now on a Steamdeck. The nix package manager also works on Valve's Arch based SteamOS. I used it to install obs-vkcapture to enable on device obs streaming to Twitch.
Holy crap, Nix is so much cooler than I thought it was. I might give it a try. Maybe I'll finally stop wasting hours after formatting my PC reconfiguring everything.
No. You'll waste even _more_ time reconfiguring everything as you try out every possible option in search of the Perfect Config, returning to it every time you find something new that you can do that you previously thought was impossible.
@@angeldude101 I'd recommend using git branches if you do that, so you can have your "standard" branch you can fall back on and then some for trying out things
@@Anonymous4045 If I don't like how it turns out, I tweak it until I do. Sometimes that just happens to land on effectively the same state it started as, but not very often. When this does happen, the new code is still usually there, just commented out or disabled or similar. Since using git on my config, and learning that I only need to stage changes rather than commit them, I generally don't commit until I'm satisfied with the result, so if there was a branch, it would've gotten merged into the standard branch after 1 commit. In general, I don't see how using branches is supposed to tame my urge to tinker and continually revisit the config every now and then.
What I love about Nix is, that you truly can define what your software needs, for example in terms ofwht specific libraries and versions andjut give it to it andit works. Nixos makes stuff possible. And ependencies is such a headache on othrer systems.
Would be a good idea to mention during the NixOS section that it is not FHS compliant meaning if it ain't packaged for Nix, you ain't running it. No downloading binaries off the internet etc.
But if you got into nix, you'll soon find out that there are ways to deal with that. steam-run, distrobox or classic docker/podman stuff. As a developer I always thought that the "doesn't run binaries" is a dealbreaker for me, but I soon found out that it isn't.
It is only a problem for dynamically linked binaries that expect other dependencies in specific places on your system. Statically linked binaries work just fine on Nix, but it may be a bit of a hassle to get it on your PATH
Just some stuff you'll encounter when you're too deep into the rabbit hole: - You'll have to rebuild your entire system after EVERY change. Want to change some text color? Add an env var to your shell? That's an entire new system generation. - No dynamic libraries. You have to install stuff the Nix way or else. There are some workarounds like making a custom FHS environment, or installing Proton. But those are that. Workarounds. - Forget your programming tooling or Linux config knowledge. It's useless now. Npx? Pyenv? Rustup? No. You have flakes for that. Editing /etc or /usr files? Nope. We don't do that here. - Something doesn't work e.g. a lacking dependency? You'll have to create a derivation yourself or wait until someone else fixes it and pushes to nixpkgs. Good luck with that. - "You can use Nix and Home-manager in other distros as well". Yeah, for GPU accelerated stuff (most GUIs nowadays) you'll need NixGL. Again, good luck with that. I use NixOS for my home server. But that's it. I don't want my system to fight me.
He's being too dramatic. It's also possible to just install the nix package manager and use whatever OS you want. You can use nix alongside other package managers, even on macOS. If you need something that hasn't been packaged yet all you need to do is take their build from source instructions and write a .nix or flake.nix file for it
To anyone reading the comment above and actually wondering if nix is for you: "I'm new to linux, what's the best distro for me?" NOT nix, just get mint if you wanna dick around, or if you have a fuckload of time and a spare laptop, arch "I wanna set up a stable desktop environment for myself and not worry about having junk from 2 years ago i never use clog up my everything as well as feel safe that my desktop wont randomly combust and need repairing for a day just so i can use it again COUGH COUGH arch" if you have absolutely no life, Nix might be a good idea "I wanna set up a home server for whatever" Nix is a valid alternative, but you might wanna just stick with debian honestly. it takes a special kind of person to actually make the commitment of learning nix worth it. and here's my experience with the things gusslx mentioned: 1 - "rebuilds the whole thing" yeah but it takes like 10-30 seconds depending on what you're doing becuase it doesn't literally rebuild everything, it just hotswaps what needs to be swapped and downloads what's missing. It sounds scary for like, an arch user, where the word "rebuild your entire system" sounds terrifying - while this is literally the one thing nix is AMAZING at optimizing 2 - Yeah if any person trying out nix wants a good laugh for themselves, try running any binary file - it wil literally just refuse to run. Epic nix moment 3 - Pretty much. just like how you learn pyenv or rustup, you could just learn nix instead. It's very much a middle finger for if you're already invested, but what's learning another thing as a developer :clueless: (this happens a lot on nix) 4 - on nix unstable: if a package is broken, it just won't let you update everything at once. you can disable that package, or grab it from stable instead meanwhile stable updates every 6 months, you got debian stability no problem 5 - yeah it's fucking wack, don't use home-manager off nixos unless you feel extra silly
1. It takes like 5 seconds. "An entire new system generation" - yeah, that's the point. If you change something "permanently" on your whole system, it should be a new generation. 2. Never heard of nix-ld? 3. No one stops you from using traditional tooling. You just might want to make it local (which is easily done with env vars and flags in any decent tool). I still do it in dev environments with go and npm. Regarding "editing files in /etc or /usr". Again, no one stops you from just declaring a raw text file with nix if you don't use relevant nix options. And even if you do, there is almost always an `extraConfig` option or something similar, where you can just place whatever you want. 4. If you are uncomfortable with things breaking from time to time, just don't use unstable. You seem to know about flakes, so you could use multiple nixpkgs inputs (e.g. unstable for latest versions and 24.05 for the broken packages). You can even find a specific commit that broke a package and add a nixpkgs version just before that. In case of a missing dependency you could just override build inputs. And even creating your own derivations is dead simple if you actually try it a couple times. 5. I don't know about using nix and home-manager on other systems (I've been using only NixOS at home and in production for 3 years), so can't say much here. But yeah, home manager on other systems does not sound like a good idea. Nix itself, however, became an integral part of my workflow due to how exceptionally good and convenient it is as a build tool, so I would definitely still use it for projects even if I had to leave NixOS And yeah, don't hesitate to ask for help at Reddit/Discourse, Nix community is extremely helpful.
nice video, I'm a beginner in this world of programming and computing, I've been trying for days to install Windows managers like hyprland, but without success my daily routine apart from eating and sleeping and studying and practically spends two hours seeing if there's a different semicolon .
Haven't you heard of reproducibility or scalability? Have you tried to setup 10 or more machines with the exact same configurations? I haven't used nix yet but is easy to see why it exists, just like docker
@@orterves There is no problem, it's just that some people think everything is a meritocracy, and if you don't do a certain thing, you're a bad programmer, as if we forget that the human factor exists, where everyone makes mistakes. Not even the best of us can escape this.
This is the one of the most interesting tech that Fireship has made a video on in like months. His videos are so much better when they don't involve AI.
Does NixOS work in an enterprise setting like RHEL? Feels handy when you realize that using Nix, you can preload configurations using a Nix file without doing it from scratch.
While the performance isn't exactly perfect because of it's pure nature, Nix is quite fast for what it does. The bottleneck is usually the developer trying to debug an infinite recursion
It's not a coincidence. It's literally _the_ origin of the name. "The name _Nix_ is derived from the Dutch word _niks,_ meaning _nothing;_ build actions do not see anything that has not been explicitly declared as an input." - Nix: A Safe and Policy-Free System for Software Deployment (Eelco Dolstra, Merijn de Jonge, and Eelco Visser-Utrecht University)
You've just made Nix users *extremely* happy. That's right, all eight of them.
fk yeah
Count my 0.1 in
I just like to watch how people attempt to install linux😂
I am so happy right now
@@GSBarlev count my 0.1 too
Pretty Happy here
"It works on my machine "
- "send me your machine ! "
Or use nix flakes for dev environments allowing to make fully reproducible builds and to list every single dependency of the project
Nix basically comes as close to that as you can without doing full-on containers like docker or even VMs.
😮 I can’t believe this
*sends machine*
I mean yeah even if the nix makes the software setup reproducible differences in the computer setup itself could still result in it not working on another machine in edge cases
Nix long time user and Haskell programmer here, welcome to the rabbit hole where you cannot edit your system files directly like you used to, if no one has wrapped it you must learn the functional language to change a simple parameter in your config, and we’ll all benefit from it! It’s a trap to force everyone learning functional programming, there’s no escape! You’re welcome!
A unicorn in the wild..
What do Haskell programmers even do for a living?
This sums up my experience so far, I love it!
This comment has the same energy of "You're being saved. Please do not resist."
HASKELL ENJOYER SPOTTED 🤝
God i love NixOS, i spent a week writing a derivation and service for a weird 13 year old hardware driver and it now just works on all of my machines forever
See now we are getting to the meat and potatoes . Thanks for sharing!
Yeah that's exactly how I feel. I spent a significantly long time figuring how to do this weird spotify mod (spicetify) and it took me sooo long to figure it out, but now that I've got it done, nixos is the only OS where this thing reliably works because it's just declared all the same and is never messed up by system updates
the most important word in that sentence is "week". nixos is great when you edit a config and it just works, but when it doesn't, be prepared to spend TIME digging through untold layers of abstraction
@@dotanuki3371 string in a string in a string comfig moment
@dotanuki3371 admittedly a good amount of that week was actually learning how nix derivations work so it would be much quicker if I did something else like that now, but the majority of that time was actual program config and service writing that you'd need to do on any system.
The nice thing though is I never need to touch it again, whereas with other systems I'd be starting mostly from scratch every time since I'd forget how I did it.
Learning nix is the hard part, but using nix isn't too bad
Nix mentioned 🗣️🔥
what the fuck is bad os?
HYPE
lets go!
That's Huge
There's dozens of us! DOZENS!
NixOS in a nutshell:
- You can't change anything with commands anymore, non-FHS compliant means you can't even install binaries and expect them to work
- Everything has to be done through the config so you better hope there's an option for it or you'll have to learn how to code up that option yourself.
- But also has the most expansive collection of packages (Rivals and in some cases BEATS the AUR in package availability)
- Documentation SUCKS
- Even without the fact that you can undo changes like installing DEs at an instant, it's solid as a rock because it's all configuration, it'll just refuse to make your new configuration rather than accepting your command to break your system, NEVERhave an unbootable system AGAIN.
- What does this error message mean why can I not find anything online for this
- Best part is that ALL your changes are just LISTED there in a plain text file so you can just read it, leave comments, and just have living documentation of every single change you've made to your system. Congrats, it's really your system now.
Good to know. Thanks
Thank you for the wisdom
ChatGPT actually works pretty OK to cover for lack of docs. Since there is a lot of Nix code out there, and 20 years of it.
fairly new (6 months ish) nix-darwin user here (just love my macbook too much to go full nixos), it's unbelievable to me how bad the nix docs are. especially for flakes, which as far as i can tell, there is no reason to not use flakes if you're new
But luckily you get used to almost all of this and almost everything starts to make sense then (even though some errors are still incomprehensible).
This Video is a great example of why nix is so hard to learn for beginners. Multiple concepts/workflows are blended together when talking about abstract concepts.
NixOS != nix != nixpkgs, mainly because "nix" is actually multiple different things (a functiobal programming language and a package manager that can interpret it).
Nix can be used without NixOS (btw.) and the configuration.nix file is only used on NixOS.
Independent from the OS, there are many different ways to "use" packages:
- nix run
- nix profile ( / nix-env)
- nix shell
- nix develop (if you are using nix flakes, which are more or less just a scheme for organizing nix code)
Still a good video, even if it is not perfect and im happy to see nix getting some attention ❤
please do not use nix env in any cases
BTW I Use Nix
What are downsides?
Lol says the Ansible King...
Btw
@@olexy.skrypniklack of documentation
What function does this serve?
damn, this is arch's arch enemy
I have arch enemies, btw
Arch Nix
🤝
SteamOS since 3.5
Arch isn't even close to be a competitor.
What? Steam is both? Or am i getting this wrong?@@GSBarlev
this bloated OS is not a competition to arch
Clicking on fireship videos is a declarative process for me
Docker: You can configure your virtual machine!
Nix: You can configure your actual machine!
Incredibly I've stumbled upon this problem right now when the video was aired, while working with VMs on Azure
@@juanbomfim22 Happens for everyone at some stage. The TS video dropped the same hour I started researching it.
And then check out nixos-generators
You can build docker images with nix too!
@@CrazyMineCuber and build nix with docker images... it's called configuration management fetishism, a subgenre of masochism
Switched to NixOS a few years ago now and it's incredible! Feels like a next-gen OS in many ways. You didn't mention what I think is one of the coolest features: nix-shell -p somepackage - you can temporarily have any package up and running to do that one thing that one time, without the need to install it or deal with the cruft left over from said random installations over years of use. Fantastic!
Really ? That a cool feature !
Yeah I love that feature as well
Not really next-gen. This OS is already 2 decades old.
@@tanawatjukmongkol2178 feels next gen though, it's just a hard idea to grasp. It needed some time to grow up, it's an OS after all. It even predates docker.
NixOS walks a fine line between frustration and purely amazing.
But everyone be careful: once you have got sucked into NixOS it's tough to go back. Despite all the pain.
Start with just nix package manager and home manager. It has way less jank and is easier to walk away from than if you go full bore Nixos
was a bit too much of a hassle for my taste. stopped using nix package manager on my phones some years back. tried again on my steamdeck but ultimately went back to compiling stuff myself
@@ImperiumLibertas Agreed. It allows you to dip your toes in and learning without relying on it too much. Also, writing a shell.nix or flake.nix for your projects can make it so much easier for other developers to have the same environment, that's a very powerful thing to try out as well without having to install a different distro.
It's the similar type of experience that Adobe clients feel while using Premier or After Effects minus the loss of cash.
@@ImperiumLibertas That's dipping a toe - but I am running NixOS servers and it's hard imagining going back now.
I‘m so glad I‘m not the only one who just SSH’s into remote hosts and starts to run random commands copied from all over the internet 😅
big question though…. who’s machines are you remotely logging onto?
where else am I gonna get my commands from
@@bullpup1337 ;-)
Just don't forget to use TimeShift!
Thank me later ;-)
@@bullpup1337 for me it's usually vps or workstation, although it's not that often that I need to set them up
Now I can add 5 years+ experience of nix in my resume
now you can add "I make reused jokes on youtube" too
First try to install linux
you meant you can add 5 years+ of experience into your nix config, right?
@@darukutsu he meant 5 years of making bad jokes on youtube
Does "nix" also mean "nothing" in English? At least in colloquial German, which makes it even funnier.
Just recently switched to NixOS. It changed my life!
Same brooooo
samezez
Same I absolutely love it
been using it for a year now, the downside is that the more you find out you can do, the more you get inside a rabbit hole with zero documentation that'll make you forget you have actual work to do (as any niche linux distro)
@@b_delta9725 documentation is ok tier
German viewers:
"alright then... keep your secrets"
Nothing to see here
lmao, took a second xD
Or Dutch viewers
Gar nix
There hasn't been a single tim I mentioned Nix to someone without hearing that joke XD
I have been trying to understand NIX for the longest time and this brought everything together so well. Amazing video
You missed a chance to say: Thanks for watching and I’ll see you in the “nix” one 😅
NixOS looks super cool, I'd definitely use it if I suddenly quit my job and stopped showering
Sounds worth, tbh
That was exactly the opportunity I had a year ago. I used it well to learn nix.
quitting a job and stopping with showering is a classic for any high-profile accomplishments.
i started using nix after i quit my job and stopped showering, i recommend it
2:40, that was actually 160
nerd
I don’t even want Brilliant but this is the one channel I would consider the ad for just out of respect for the great content delivered
I was 99% sleeping and suddenly notification pops up. Now I am 100% awake.
@parwatithakur2391 Also Bangladesh too.
1h later: falls asleep happily 😂
😂
So am I
@parwatithakur2391 stay asleep
wild that this concept isn't already built in in modern OS
As a long-time Replit user, Nix has a massive grip on my projects
why would you use replit?
Replit has been on a corporate downfall ever since they made us pay to host websites under a SUBDOMAIN
@@tongpoo8985Best code editor on mobile (no don't tell me to stop coding on mobile, sometimes I'm inspired and want to work on stuff)
@@tongpoo8985pretty sure replit is built with nix. Shopify uses it for dev environments too IIRC.
@@tongpoo8985i dont hab pc or laptop
nix in 1 sentence : linux but all your configs are stored in a text file which you can use everywhere and not worry about setting up your system ever again feat fancy shit you'd probably never use but can still flex on reddit about it
A nice side-effect, is that if you own multiple machines, just have to sync to files up with vcs, and nixos-rebuild switch, and there you go, same setup everywhere. ( with home-manager makes it even better )
It's not just that, it's functional and functional programming its not very intuitive to use for a beginner
@@seriouslyWeird just as intuitive as any other json or yaml configuration file
Yeah I see the application for a work project, but for a home machine, I can always just use a flat shell script I keep updated..
@@marusdod3685 as someone who's used it, it's not. You have a full programming language to mess with for your configs. JSON, YAML, XML are just static data, key value at the end of the day. NixOS has so many abstractions and moving parts it can confuse even the most hardcore functional programmer which none of us are.
been using nix as my daily driver for like 5 years! i love it, just hate when you have to write your own nix package for whatever niche program you're trying to run.
Finally you talk about the best, most original and useful Linux distro of all time
I was just talking about NixOS to a friend, amazing video
1:19 Best illustration of packages fighting of all time 😂😂
I firmly believe it's just a matter of time before we get a fully graphical nix configuration editor. Just push the right buttons and check the right boxes, all generic linux options can be defined without writing a single line of code. That's sufficient for most users.
for some reason i thought fireship had already made a nix video. this is great to see!
nixos users to arch users: i`m the btw now
Arch users to each other: "Is that how annoying we've sounded all this time?"
Sorry, you have the face the facts : Nix just isn't as memable 😄
Does Nix have things like Nyarch uh ?
I'm a fireship fan, I donno what any of these things you say are, I'm here for the sarcasm and comedy🎉
same xD
💯
NIX MENTIONED LETS GOOO
Few days ago I was like "I need to tell Fireship to make a video about Nix".
Fireship few days later: Nix in 100 Seconds
I now paste the stuff I copied from random parts of the internet into config files buried in places I'm not used to them being in.
What you can't see, can't hurt you... right?
Except that all the config files are in the same place and if you don't understand an option you can go see for yourself what it's doing under the hood through nixpkgs
Just got started with NixOS last week myself, and I'm pretty happy with it so far. First time setup is a bit of a pain, especially if you're not used to the workflow, but I really enjoy a lot of the benefits that come with the declarative setup.
NixOS 💪💪💪
Yo
The GOAT is here
Hey, sensei
the goat
❤️
Thanks
NIX, Never heard that before, Good to Know Now!!!
I agree with your take on the power and utility of the NYX package manager. It is indeed a game-changer when you can have a deterministic and reproducible system configuration.
Fastest click in the west
Of Mississippi
Da best in za west
This reproducible and declarative way of configuring your system is interesting because it allows for feature modularity without having to worry about system's state
For example, consider a program which uses python to work, if you install in your machine, you need to certify that you have the needed python version, but what if another program needs an older version of python
With Nix, you simply add to your package list or configure it using modules, which are literally code snippets that you can send to other people and it will work too
Not covered by Fireship, but the Nix ecosystem is full of tools and modules to configure a lot of things:
- Home manager: allows to use one language (Nix) to configure all your dotfiles in your home dir
- Disko: Extend the declarative way for partitioning and formatting your drives (with support for ZFS, BTRFS and other file systems)
- Impermanence: Modules for an immutable system to declare which files and folders to persist between boots
- Arion: docker compose but with nix
the standard nixpkgs also has modules for a lot of things, even configuring minecraft servers on it
No way Nix and Arizona mentioned in the same video???? This is my lucky day!
in all internet you absolutely make the best videos ever!
gonna share this to nixos discord
this video is awesome.. my fav tech channel talking about my fav distro
Other code language users: “Oh no! I messed it up!”
Nix users: “I don’t have such weaknesses”
i think you didnt understand the video
Nix, the "code language". Yeah.
@@TheCamps10 i mean nix is a package manager, operating system AND a programming language so they're technically correct i guess
(but you can still easily make syntax errors in nix, i think what they're referring to is the ability to rollback to previous versions of the system)
Lmfao spot the first year CS student
@@frostiefops dont overthink, he just commented what came to his mind thinking it is funny to get some likes, thats it
Ive been using nix on macbook for many years, eventually i got the option to use Linux again and installed NixOS - i have never been happier with my machine
Oooh linux distros in 100 seconds, awesome!
So basically it allows to use same versions of packages over different devices, such a simple idea but damn they perfected it to the max level
I've been using NixOS for months now. And this is home.
The only other OS I'll use is Arch.
Couldn't care less about Windows or the distro hopping nonsense on Linux (aka Debian with a different spray paint)
So how's nix vs arch? Asking about WM and custom DE experience.
@@rafal9ck817Better I'd say. Nixpkgs has about the same, even a little more, packages than the aur. Also many programs like hyprland are directly configurable from the configuration.nix.
@@rafal9ck817 Both are great. Arch is more stable than what most people will tell you. When it comes to Window Managers. Hyprland. nuff said. First class support on NixOS and Arch
@@rafal9ck817 probably on par but definitely more convenient on nixos (as you have all your DE config in one place)
@@rafal9ck817 I have been wondering the same thing and hyprland seems to work really well on it from what I've read. I think the last census showed about 25% of hyprland users were using NixOS, so there'll be good support and documentation. I don't know about what other WM / Wayland compositors would be a good pick for Nix.
Literally been working on a few tools using nix for the past week! Using it for nodejs is not easy but rewarding!
I love how the comments are full of people that love Nix and will do anything to stop you from submitting to its torture
I'm excited to be able to add this to my resume now after watching this video.
Correction at 2:44. Developers understand how solve only problems they or other developers created. But they are not always do.
Just moved from Mint to NixOS yesterday, it's really good in my opinion, doesn't come with bloat and currently idle it uses less resources than Mint Xfce.
The new Arch... btw.
I use NixOS, btw
needs a different 3 letter catch phrase.
arch is cool and all...
_i use nixos tho_
Anyone who's ever tried to do anything productive on SteamOS: _¿porque no los dos?_
@@GSBarlev Jovian-NixOS mixes SteamOS with NixOS. I'm daily driving it right now on a Steamdeck. The nix package manager also works on Valve's Arch based SteamOS. I used it to install obs-vkcapture to enable on device obs streaming to Twitch.
I really hope NixOS does not become too viral. It would become cancerous afterwards
Sorry about your mom, mate. You're a brilliant youtuber and I love your work. Thanks for all you've taught me!
Holy crap, Nix is so much cooler than I thought it was.
I might give it a try.
Maybe I'll finally stop wasting hours after formatting my PC reconfiguring everything.
Try it out in a VM! It's pretty great.
No. You'll waste even _more_ time reconfiguring everything as you try out every possible option in search of the Perfect Config, returning to it every time you find something new that you can do that you previously thought was impossible.
@@angeldude101 I'd recommend using git branches if you do that, so you can have your "standard" branch you can fall back on and then some for trying out things
@@Anonymous4045 If I don't like how it turns out, I tweak it until I do. Sometimes that just happens to land on effectively the same state it started as, but not very often. When this does happen, the new code is still usually there, just commented out or disabled or similar.
Since using git on my config, and learning that I only need to stage changes rather than commit them, I generally don't commit until I'm satisfied with the result, so if there was a branch, it would've gotten merged into the standard branch after 1 commit.
In general, I don't see how using branches is supposed to tame my urge to tinker and continually revisit the config every now and then.
@@angeldude101 Hmm yeah it probably wouldn't help much with your usecase then.
fireship: this was supposed to be my first video, I've been researching it for a decade, it is finally out.
Finally Nix!
A video on sysadmins would make my day.
Nix OS Rocks for Servers
What I love about Nix is, that you truly can define what your software needs, for example in terms ofwht specific libraries and versions andjut give it to it andit works. Nixos makes stuff possible. And ependencies is such a headache on othrer systems.
Would be a good idea to mention during the NixOS section that it is not FHS compliant meaning if it ain't packaged for Nix, you ain't running it. No downloading binaries off the internet etc.
But if you got into nix, you'll soon find out that there are ways to deal with that.
steam-run, distrobox or classic docker/podman stuff.
As a developer I always thought that the "doesn't run binaries" is a dealbreaker for me, but I soon found out that it isn't.
@@InfinityN steam-run, nix-ld, nix-shell: "am I joke to you?"
It is only a problem for dynamically linked binaries that expect other dependencies in specific places on your system. Statically linked binaries work just fine on Nix, but it may be a bit of a hassle to get it on your PATH
i was literally seraching for this and fireship made this video.. 🔥
NixOS! NixOS! NixOS!
Love this vid.
The wait was worth it ✨️❤️
Nix mentioned 🔥🔥🔥
fireship, your influence is making the world a better place. - by one of 45 nix users
Just some stuff you'll encounter when you're too deep into the rabbit hole:
- You'll have to rebuild your entire system after EVERY change. Want to change some text color? Add an env var to your shell? That's an entire new system generation.
- No dynamic libraries. You have to install stuff the Nix way or else. There are some workarounds like making a custom FHS environment, or installing Proton. But those are that. Workarounds.
- Forget your programming tooling or Linux config knowledge. It's useless now. Npx? Pyenv? Rustup? No. You have flakes for that. Editing /etc or /usr files? Nope. We don't do that here.
- Something doesn't work e.g. a lacking dependency? You'll have to create a derivation yourself or wait until someone else fixes it and pushes to nixpkgs. Good luck with that.
- "You can use Nix and Home-manager in other distros as well". Yeah, for GPU accelerated stuff (most GUIs nowadays) you'll need NixGL. Again, good luck with that.
I use NixOS for my home server. But that's it. I don't want my system to fight me.
Thx for the insight, might have dodge a bullet for my main system
He's being too dramatic.
It's also possible to just install the nix package manager and use whatever OS you want. You can use nix alongside other package managers, even on macOS.
If you need something that hasn't been packaged yet all you need to do is take their build from source instructions and write a .nix or flake.nix file for it
To anyone reading the comment above and actually wondering if nix is for you:
"I'm new to linux, what's the best distro for me?" NOT nix, just get mint if you wanna dick around, or if you have a fuckload of time and a spare laptop, arch
"I wanna set up a stable desktop environment for myself and not worry about having junk from 2 years ago i never use clog up my everything as well as feel safe that my desktop wont randomly combust and need repairing for a day just so i can use it again COUGH COUGH arch" if you have absolutely no life, Nix might be a good idea
"I wanna set up a home server for whatever" Nix is a valid alternative, but you might wanna just stick with debian honestly. it takes a special kind of person to actually make the commitment of learning nix worth it.
and here's my experience with the things gusslx mentioned:
1 - "rebuilds the whole thing" yeah but it takes like 10-30 seconds depending on what you're doing becuase it doesn't literally rebuild everything, it just hotswaps what needs to be swapped and downloads what's missing. It sounds scary for like, an arch user, where the word "rebuild your entire system" sounds terrifying - while this is literally the one thing nix is AMAZING at optimizing
2 - Yeah if any person trying out nix wants a good laugh for themselves, try running any binary file - it wil literally just refuse to run. Epic nix moment
3 - Pretty much. just like how you learn pyenv or rustup, you could just learn nix instead. It's very much a middle finger for if you're already invested, but what's learning another thing as a developer :clueless: (this happens a lot on nix)
4 -
on nix unstable: if a package is broken, it just won't let you update everything at once. you can disable that package, or grab it from stable instead
meanwhile stable updates every 6 months, you got debian stability no problem
5 - yeah it's fucking wack, don't use home-manager off nixos unless you feel extra silly
1. It takes like 5 seconds. "An entire new system generation" - yeah, that's the point. If you change something "permanently" on your whole system, it should be a new generation.
2. Never heard of nix-ld?
3. No one stops you from using traditional tooling. You just might want to make it local (which is easily done with env vars and flags in any decent tool). I still do it in dev environments with go and npm.
Regarding "editing files in /etc or /usr". Again, no one stops you from just declaring a raw text file with nix if you don't use relevant nix options. And even if you do, there is almost always an `extraConfig` option or something similar, where you can just place whatever you want.
4. If you are uncomfortable with things breaking from time to time, just don't use unstable. You seem to know about flakes, so you could use multiple nixpkgs inputs (e.g. unstable for latest versions and 24.05 for the broken packages). You can even find a specific commit that broke a package and add a nixpkgs version just before that.
In case of a missing dependency you could just override build inputs. And even creating your own derivations is dead simple if you actually try it a couple times.
5. I don't know about using nix and home-manager on other systems (I've been using only NixOS at home and in production for 3 years), so can't say much here. But yeah, home manager on other systems does not sound like a good idea. Nix itself, however, became an integral part of my workflow due to how exceptionally good and convenient it is as a build tool, so I would definitely still use it for projects even if I had to leave NixOS
And yeah, don't hesitate to ask for help at Reddit/Discourse, Nix community is extremely helpful.
Sounds like a skill issue
Was waiting for this for a long time🎉🎉🎉
NIXOS FINALLY!!!
nice video just didn't talk much about the purity of nix packages and how packaging is so much different than other package managers
hi flafy
@@neoney omg neoney hi
@@neoney why would u find the comment
1:48 How's that desktop env called? It looks nice
deepin
Definitely trying out NixOS
It’s a rabbit hole
For sure . It’s been on one of my laptops for like 10 months still building and running properly
Make sure you have plenty of time before you try this...
BRO
nice video, I'm a beginner in this world of programming and computing, I've been trying for days to install Windows managers like hyprland, but without success my daily routine apart from eating and sleeping and studying and practically spends two hours seeing if there's a different semicolon .
Video ends at 1:40
2:40
The real 100 seconds
Same 🙌🏻🙀
Thank you sponsorblock.
😂😂
The "in 100 seconds" videos are never 100 seconds. And it is beautiful.
2:45 No, tools like Nix exist because bad developers know how to create new problems.
Haven't you heard of reproducibility or scalability? Have you tried to setup 10 or more machines with the exact same configurations?
I haven't used nix yet but is easy to see why it exists, just like docker
Nix sounds great, much like docker. What's the problem?
Shitty take alert
Do you have fucking cancer my guy?
@@orterves There is no problem, it's just that some people think everything is a meritocracy, and if you don't do a certain thing, you're a bad programmer, as if we forget that the human factor exists, where everyone makes mistakes. Not even the best of us can escape this.
About time you create this vid
LESGOOO NIX MENTIONED
Thanks for the explantion!
100 seconds in.... "To get started"
God, Fireship is the gift that keeps on giving… although I still have no idea what Nix is
0:31 Hit right home hahaha
Ha yeah this is so true
Haha yes I also copy all of my code from stack overflow lol!
The nix sink hole gate is open ! It’s the year of the NixOS !
Wished they didn't kick out developers because of personal issues
With my DevOps/sysadmin hat on NIX looks amazing!
This is the one of the most interesting tech that Fireship has made a video on in like months.
His videos are so much better when they don't involve AI.
Does NixOS work in an enterprise setting like RHEL? Feels handy when you realize that using Nix, you can preload configurations using a Nix file without doing it from scratch.
But is it blazingly fast ?
not really
While the performance isn't exactly perfect because of it's pure nature, Nix is quite fast for what it does. The bottleneck is usually the developer trying to debug an infinite recursion
catchyos is the fastest as of today
I use nix and love it for my home lab server used to use Ubuntu but you can so easily role forward and back node versions etc etc it is awesome!
Packaging my application on nix, importing it onto a nix server, and configuring the server with terraform. Truly, everything as code.
ansible also
Terraform state sucks, as does the company that owns it
you can also use nix as a homebrew replacement on MacOS. it’s great.
Fun fact- Nix (spelled as Niks), means nothing in dutch. The inventor is also Dutch. Coincidence? Possibly. Not likely.
It's not a coincidence. It's literally _the_ origin of the name.
"The name _Nix_ is derived from the Dutch word _niks,_ meaning _nothing;_ build actions do not see anything that has not been explicitly declared as an input."
- Nix: A Safe and Policy-Free System for Software Deployment (Eelco Dolstra, Merijn de Jonge, and Eelco Visser-Utrecht University)
I didn't understand most things, I'm not the target for Nix content but I liked the vid
As always. Thx
TLDR: the replit thingy
Ok this is actually pretty cool, now I finally see why people enjoy this thing.