And then Sauran said, "One config file to rule them all and in the darkness bind them." Oh how the analytical nerds love their single shot one size fits all poopchute solutions. There go all the chmod permissions and user access controls that the Founders built to keep our systems from getting hijacked and booted off the Internet. Congratulations you rebuilt Windows, disgusting.
Hahaha yeah, I saw that 1h before I published, I finished my video 6h ago 😂 Great minds think alike! I loved my time with Nix, and it’s definitely going to end up on my main editing rig!
Three words: Documentation, documentation & documentation. Seriously, figuring out how the finer details of nixos work is WAY harder than it should be.
@@TheLinuxEXP The manual is great for initial installation and managing a single system. But as soon as you try to go beyond that (say nixos-rebuild remote deployment, flakes or what have you), the documentation becomes forum posts and source code. It's very powerful, and I've used it quite a bit on home servers, but most documentation talks about the high-level operation of a nixos system and does not talk about the finer details. It's kinda like having a tutorial but no manpage.
And all of the docs for nix are pretty much oudated because the `nix` command is still "experimental," so if you start out without knowing anything you'll probably begin using things like `nix-env` without knowing the compatibility issues
@@gtsiam Yeah, Flake is such a headache to understand. Unlike the .nix config file, it doesn't have a great guide for how to get it working. I honestly just gave up and will only use anything that could be simply imported as a module instead of messing with flakes and overrides.
I started using NixOS a few months ago and the moment that made me realize how powerful it is was when I added gnome.enable = false; plasma5.enable = true; to the config and rebuilt then my whole system switched to KDE without any issue, it was like magic. Since then I've started learning how to use flakes to setup dev environments inside of every project I have that way I can use direnv to automatically load the flake with a shell environment with all the dependencies (and the right versions too) for that project when i cd into the directory or open it in vscode.
Agreed. Super awesome to just cd and have direnv do the rest. Also super nice that they have flake templates on the github so making a rust project or something takes like 20 seconds total to set up
I prefer to just comment out stuff over marking something as false ngl. Also, IMHO the most powerful aspect is when you use home-manager... and then use that one config file to recreate all your configs through all your devices. It's great.
I've been using NixOS for just over a year now and it's nothing short of life-changing. I'm constantly switching between my desktop PC, my home server, my work laptop, and my personal laptop. With NixOS (and flakes, and home-manager) my entire computing life has been moved into a single git repository. Everything from the desktop apps I have installed, to my GNOME hotkeys, to my shell plugins to ssh config (which automatically adapts to the address/ports I've configured for my other machines) is all controlled in once place and seamless to sync between every machine. It's incredible that an operation as complex as "I want my home server to export NFS shares safely tunneled through Tailscale to all my laptops and regularly backed up with restic" is now just a commit in a git repository, just like adding a feature in any other coding project. And now that I've done it, it's perfectly reproducible. If I ever get a new laptop, every setting will be exactly how I want it, and all my NFS share will mounted and ready-to-go from the moment I install the OS!
So you are one step closer to having all zero clients, like we use with Vmware and Windows machines where we have one "Golden image" and everyone who signs in gets a clone of that image. ^_^ Or in Windows where you have start-up scripts that map all your drives/printers/syncs your desktop/documents, etc. Very good. I'm all about one step setups, they take a bit of time to get configured the first time but the ease of use is great. If this avoids a lot of license costs, this could be a great idea for a lab environment where we need to rebuild a test system often.
Big deal! I can blow out my MacBook and resurrect it back in a few minutes once MacOS is installed. All my files are replicated across all my Macs, iPads and iPhones. I don't need to learn a programming language to do it. You Lintards really like making a big deal out of nothing. Your OS and software are inferior, yet you keep polishing Linux Turf. Get laid and get a life!
This kind of "configure once and clone for free" is so valuable feature in corporate environment that I cannot overstate it enough. The ability to reproduce very quickly known working OS installations with all needed tweaks across different hardware is badly needed in servers, virtual machines, office computers and pretty much everywhere.
Right? I've been thinking a lot about how you'd go around building a sustainable business out of this. So far I can say it's a lot of work, and I mean a lot :) You'd think things are 90% of the way there, well yes maybe, but also all the plumbing is there and none of the porcelain - app stores, the sync / update / upgrade actually working well (without CLI), graphical config, tuned hardware support (10 hour battery life), tuned prebuilt modules to support cloud remote desktop infra on various providers, security, automated ISOs ... Same line of thought for consumer desktop OS that works really well, perhaps on a small curated set of hardware. Also so much potential and also a lot of work. Certainly the tech brings so much opportunity to build on top of it. I hope people go wild, be successful and we see some amazing products out there in a few years.
I find pretty interesting the whole theory behind Nix and NixOS concepts, the original Eelco Dolstra thesis how can we apply the functional programming concepts into a operating system, and problems found in software development such as side-effects and mutability can also be found in deploy systems, and thus Nix and NixOS becomes sort of a "programming language" but for managing systems, where expressions and functions evaluates to a systems state (declarative way). Whereas using normal operating systems like Windows, Debian or Arch are like doing everything in a imperative way. This solves many issues but also introduces a new abstraction layer between you and the system and some engineering problems, the project has actually evolved a lot and developed new tooling such as Nix flakes, but being officially stated as "experimental" divides the community into two large chunks of people (those who use it with the new "nix commands", and those who are using old tooling which has some issues) Also, a lot need to be done to make these concepts easier to grasp for new people to learn, documentation can be better. Also, the declarative way of configuring systems in only one place can be done through a GUI which edits the configuration.nix file and applies then for the system.
This is actually crazy. I installed Nix-OS for the first time yesterday. I've had a blast learning about how to set it up and I've just been building my own little system and all of a sudden this video gets posted. This could be a sign that Nix-OS will be my forever distro of choice.
You can even have multiple channels in use at the same time! Most of my packages are from the release channel but a few are from unstable and it works flawlessly. It's not a perfect choice though, because for the rare few packages that are unavailable in the repos it's not simple to build your own package initially and it's also unlikely to work with a prebuilt executable because linking works differently. But overall, it's an amazing distro and I have my eye on SnowflakeOS which is meant to be a more user friendly, GUI centric flavour of NixOS.
worth noting that prebuilt executables _mostly_ work with things like steam-run - (and of course appimages with appimage-run) (and nix-ld if you can figure that one out)
it's also worth noting that for certain language ecosystems (rust, ocaml among other things) it's *mostly* a matter of just either using a single function call and specifying where the language's manifest is, or cloning a template and doing the same
Nix looks incredibly powerful, A tweaker's dream system perhaps. The amount of control one is given is incredible. All while remaining manageable and not getting too crazy complicated. The average user probably never has to touch these tools, but for an advanced user that likes to tweak things this has all one can desire.
Been on it for a year and a half so far after going, hmmm, ubuntu -> manjaro -> popos -> arch. It really feels like the "Ultimate" Linux, the "final distro hop" for me. The nice thing is that normally, Linux is so configurable that it is easy to get yourself into a situation where you are screwed because you've created an untested state/configuration, but thanks to nixos's features, you are protected from that... which basically means you get both the massive configurability of Linux but WITHOUT having to pay the (quite severe IMHO) cost of the risk of screwing things up since it's all declarative and you can rollback atomically and at boot. So you get the best of all OS worlds basically. For example, in any other distro I would have NEVER messed with things like Plymouth or changing the boot loader or switching window managers, etc.... because I would have been afraid of being hosed at boot and having to go through the pain of booting off a USB key and spending a day troubleshooting and fixing it. Now, I have a neat animation at boot thanks to a declarative Plymouth config! AND I tried a few other window managers without any issue! AND I have ZFS on root which I wasn't able to get working reliably in any other OS but Ubuntu... but even there, it eventually slowed down to a crawl whenever I did an apt update because it made ZFS snapshots every time in order to enable rollback from a bad update, which is of course completely unnecessary in NixOS =)
This could be just me personally but man, you're nailing those videos lately. The last couple of videos have been about perfectly what I was interested in or currently testing. Great work!
Thanks a lot! I’ve been putting a bit more time into trying to find topics that really have some potential (and also that interest me), and I’m trying to up my editing game a bit as well!
Nick talks about all the config being in a single file but actually you can make your config modular and use as many files as you like, which can be conditionally included based on the hostname or some other characteristic of your system. That's how I manage config for multiple machines (including specific differences for each) in the same git repo.
Also, you can use home-manager to manage your nix install on other distro, and to use several options that can be used to manage user-level configs and home files. NixOS have really changed how I use my device, and now, I pretty much do declarative everything... home-manager, ublue-os, conty, even flatpak to some degree.
Also, sheesh, anything longer than a paragraphs really starts to get potentially auto-removed by youtube for some reason. Dunno why this happens only on Linux channels, but man, I wish I know what's the limit other than a general "keep it visible on mobile".
I'm glad you mentioned ublue-os. fedora's idea to use docker/podman/oci containers as the source of your base os (and future work on bootc) is game-changing IMO. I always wondered why folks were investing so much in immutable distros but now they make so much sense.
@@lordofla Yup. To prove how right they were, even Microsoft is slowly trying to containerise everything. From app, and if possible, to their OS. As usual, they steal ideas from Linux that many Linux users didn't even look too much into.
Indeed, the possibilities are endless. My user config shares a common home-manager config for all my Linux systems and a Mac, for the latter I just include only the compatible parts, and in some cases it even filters some nix expressions (at build time) from the config to make it suitable for Mac. So any config change can be applied to all systems with just one commit and one rebuild (per system). With flakes you can even directly switch from your git repo (without manually downloading anything)
I should mention for those who want to install the nix package manger in other distributions. Hardware acceleration is not officially supported on non-NixOS distros because it is not reproducible by modern gpu designs. There is a nixgl, but it is not very well tested because the developer needs access to different hardware types. It also feels hacky from the user's perspective.
System admins been doing this for ages... just from the "outside" and works for any distro. (Ansible, puppet, salt...) Also gentoo was sort of the same, but even more complex :)
In order for nix to work, it needed to do a lot of tricks which it's no easy, also, Nix does follow the FHS pattern entirely, which makes you needing to package the software in the "Nix way" in order to run it, since our applications and programs do a lot of side-effects on the system which Nix is against it
Because it is very, very, very difficult to do. NixOS as a normal user is simple and beautiful. Once you start to get into overrides, flakes, and other configs? It starts to get messy. The NixOS packages undergoes a LOT of testing to make sure that everything is always build correctly. And when they declare dependencies? It's done through modules -- that means, it's not just one module have to be right, EVERYTHING has to be right and will build reliably. Imagine if AUR PKBUILD references other PKGBUILD directly, and have a requirement to always build correctly and reproducibly. And yet, anything less could mean your system fails to build. The maintainers has done a lot to make it seem so simple from user perspective, despite how it's still quite complicated to get into.
I've had a great time using NixOS on my work computer. My basic setup is to use NixOS for the system and DE, then everything else is run as Flatpak. Best of both worlds. Unbreakable base with unlimited rollbacks, plus up to date desktop software updated independently of each other. It's like a dream come true.
I do that for my gaming pc except I use home-manager instead of flatpak to install all my user specific programs independently and declaratively. Either one probably works great though.
"All apps are installed through flatpak" (specifically Flathub) seems like both a really desirable setup AND a great way for a new distro to offload a huge chunk of the (ultimately redundant) work that goes into maintaining their repo. Surprised I haven't heard of any distros that are set up to work that way.
Too bad dbus-reliant Flatpaks are broken on NixOS and won't launch (like Loupe, for example), and some are shittily made like Slack, which for some reason can't find my Adwaita cursor, so I'm stuck using the one from Nixpkgs.
After all these years experimenting with Linux, it finally happened, The Linux Experiment channel finally released its own Linux distribution: Nick's OS. Jokes aside, NixOs is an interesting concept. Having your Linux configuration backed up and available to take with you however you like seems pretty neat.
Ironically, that actually happened. GNU GUIX (pronounced 'geeks') is very much influenced by NixOS. Except instead of a DSL language it uses LISP Scheme Guile so the learning curve is higher. NixOS uses Systemd while GUIX uses GNU Shepherd. An all Snap version of Ubuntu is coming soon. Other immutable systems are out there as well, each a bit different design but sharing many of the same benefits.
@@matthewstott3493 A part of me really wish they used yaml or at least accept that through a module of some sort. I really liked the design of fleek, and it would have made things simpler for people to learn, but fleek is very limited right now and I feel like the main user-facing nix config, at least, could've been made in that easy-to-read playbook format.
Intresting to finally understand what Nix is all about, hope it stays relevent and that other distro's take from its ideas about simple deployment, and rollback capeabilities :)
They are - ublue-os have stated some Nix influences, even if they use a different principle in the way they did things, and VanillaOS is working with them to bring the same workflow to their OS. Also, both of them are huge fan of Nix and makes installing the package-manager easy on their distribution. The idea of reproducible, declarative, immutable OS with easy rollback and deploy is slowly being adopted by many, and Nix is definitely an influence.
Yes, this I imagine is where the inspiration for ublue-os comes from. You can just... declare everything through a text file, and it'll build an image for you. It's practically is a custom distro, as I manged to build a ublue-os based on Kinoite but with WhiteSur theme and default layout, plus all of my preferred configs generated by default thanks to skel files.
I think their configuration file idéal is really good and will be much easier to backup. But I do think for more adoption they will need a simple to use gui option.
I've installed NixOS yesterday and I am amazed. I'm starting to understand the home-manager and flakes... Everything around NixOS looks awsome. I'm just having an issue installing a proprietery trading platform (that works natively in linux.. I've used with other distros). I'm still trying to figure out to solve this... I hope I can make it. I'm having such a great experience that I don't want to go back to other system :D
Very well done, hands down the best summary by a "Linux mainstreamer" (by no means meant in a bad way! I enjoy your videos even as a veteran!). It focuses on the actual main points. For part 2 home manager and the concept of devShells would probably round out the main benefits. As low hanging fruit: real configuration management simply by keeping your config in git. Also a huge benefit: you can comment your configs with things learnt/problems solved, so on the long run you'll never have to research the same solution a second time: a well invested learning curve, even when steep.
One neat thing about Nix that I've been enjoying a lot is the ability to try out packages, without installing them at all! The "nix-shell" (or "nix run" if you use flakes) command temporarily adds a program to your current shell session, and when you exit its gone. That, together with being able to share my entire systems configuration on two NixOS machines and a Macbook, makes it the perfect distro for me :)
Random note: Nix syntax is based on Haskell, a purely functional general programming language. The word "function" used in procedural languages usually means "procedure". Functional (or purely functional) language families aim for the same reproducibility (proof of correctness), immutability (resilience and consistence), declarative style and isolating anything that has side-effects into the smallest tiniest possible attack surface that can't be validated by machines-algos but are easy to peer-review by humans (side-effects = modifies the "universe" in any other way than just being returning a deterministic result ofthe same arguments). Honorable mention for Guix, from the GNU, which uses Guile, a Scheme language (Scheme is a LISP cousin but with pure functional orientation, while LISP allowed for side-effects)
I appreciate this explanation, TIL! I've heard of functional programming and Haskell before, but always struggled in seeing how they are different in approach/nature to more conventional types of programming.
NixOS is not the next arch. It is an entirely different monster. Once you understand how it works it's both easier and more stable than arch ever was, not to mention far easier to recover if something goes wrong. However, a major drawback of Nix and something arch does well is documentation. NixOS seems to be improving on this but it still has a long way to go. Also configuration of some applications can be difficult, mostly because documentation is lacking.
@@showlottathings Yeah, that's pretty much my experience as well. You can set it up to back up/snapshot and save most files to git-hub for when something goes wrong because it will. But NixOS is so much easier in this regard as automatically does this. It turned out I was spending almost as much time working on tinkering/recovering/updating/etc.. then actually getting any work done. If that's your thing fine but I'd rather have a stable system with automatic back-ups whenever anything changes that can be duplicated across all my systems at the same time. NixOS excels at this.
@@9s-l-s9 Correct me if I'm wrong, but I thought Guix is a package manager? I've never used it so I'm not very familiar with it. Nix is both a language and a package manager but NixOS is an OS. Strangely this actually makes looking up questions about NixOS a little more difficult as often searches bring back results about the package manager and not the OS.
Gotta say, I've been getting into Linux the past couple months, and this here, looks friggen amazing. Great video showing an overview of everything. Definitely going to look into Nix OS.
I wanted to reply because.. I’m an internediate+ Linux user starting with nixOS. Your video answered ALL my questions - with just enough info to let me learn the rest MY WAY. You helped me understand configuration.nix vs nix-env. I finally understand what flakes can be used for. Most importantly, I now know that I want to use home-manager. Even after my little nixOS use, I think it’s going to be my new way forward. Great content; your videos are awesome for newbie to power(-) users!!
Happy to finally see a video about it from you! I've been using it for many months now, and its pretty great, and super stable! But the nix language still seems way more complicated than it needs to be, and they really could've avoided making their own language I think.
GNU Guix System is based on a fork of the Nix package manager that uses the Scheme programming language. You get to use a REPL based development workflow for your config. Much more experimental/messy than Nix though (e.g. you don't get the default Linux kernel, you get Linux-libre, you can't roll-back per package that easily; etc.) so I don't recommend it for most right now.
@@KabeloMoiloa there's an unofficial repo called nonguix, which contains the default Linux and some other nonfree or otherwise problematic stuff (like Firefox with its weird trademark situation)
I think that Nix OS is technically one of the best, if not the best distro. I tried it a few years ago on my laptop and I said that I would switch to Nix OS if my arch linux broke and I couldn't fix it in 5 minutes. However, since arch has been easy and quick for me to fix I have yet to switch to Nix OS.
Last video: “Linux needs a system backup tool.” Me: “I write a bash script to set everything up for me on system install, so ye?” NixOS: “I am three parallel universes ahead of you…” TYJ for Nix!😊
Glad to see this video recommend on RUclips! I've been using NixOS since 2017 It's mostly been a good experience. Hoping more people catch on to it's cool features and unique approach to system building.
It's a neat concept, but ultimately I think rpm-ostree is more approachable in that regard. It also lets you define your operating system in a Containerfile (some call it Dockerfile) the same way you do with any container. And then it can be easily reproduced. I can see why Guix/Nix would be appealing, but the industry has moved to OCI containers. And rpm-ostree allows you to use this same technology for operating systems!
As a user of Linux since discovering Redhat in 1996 why have i not switched to Nixos already? A great video. Thank you, and I love your comedy moments. Makes me laugh😅.
The thing I think not mentioned in video, is that you can edit the config using any text editor, including VSCode. You only need console for running rebuild etc
Man, this is too much work for a lazy man like myself. Also, I absolutely love how their package manager can be installed on other OS's beside Linux. Just like a boss 😂
Hahah yeah it’s not for people who just want a plug and play experience! It becomes plug and play for any system after you spent time building your config
I might actually mess with it in a VM and see if I like it. Thanks for explaining it the way you did, Nick. It actually never made sense to me until I watched your video. Much appreciated 👍
This is a very compelling system. I never looked into Nix closer, but the way you describe it is something I will consider. The complete and reproducible control, with the states I can go back; man that's a dream. But how does it compare to other immutable distros? I think the single config file for reproducible installs is the killer feature others don't have. Super interesting.
@@socvirnylestela5878 But then you have two competing package managers for the system. I am not sure if that is what I would go with. I didn't consider using nix on other distros than where it is native to. How does it play with the rest of the system? Because of the immutable nature. Really need to read more about, that's confusing to think about. :D
The differences between NixOS and other immutable distros are basically. 1. NixOS is completely immutable, most others have at least /etc read write, on NixOS you manage that through your one or more config files as well.
2. Rollbacks regardless of filesystem, you can use ext4, xfs, whatever, you're not limited to one, unlike in other immutable distros which all use Btrfs.
I hope this video will make Nix more popular. Sometimes it is a pain not being able to run random binaries, but everything I need is packaged. The packages are reproducible and generally really good.
Great introduction video to NixOS! I would love to see a follow up video of your longer term usage thoughts (maybe creating a more modular config?), and/or going into more depth on less documented information and tools, like flakes and new nix command (nix-env -iA is not recommended anymore 😅). One warning I will give potential users is that it can be tricky to know if an issue is due to Linux or NixOS. For example, you cannot simply run a binary you download from the internet without some work.
If you've ever used ansible and thought "if only my OS just worked like this from the start" that's basically Nixos. You spend more upfront time configuring things, but you get peace of mind, self documentation, immutability, and automation in return. But it is *a lot* more upfront time, and not without its own oddities and frustrations. No OS is perfect, but Nixos has gotten much closer to perfect for me than any other OS I tried.
Like that nix is getting recognition it deserves. I recommend you to dive deeper to new nix commands (not using nix-env), configuring system as flake and system's partition using disko 😉
NixOS is awesome, but docs sucks they seriously need something like Arch Wiki , if you creating a distro which is so different than other distros, good and updated docs is must. Recently I was trying to build software written in Swift and it was horrible experience, so it is good untiil you are trying some exotic stuffs
0:04: "You probably have heard about Nix OX" Nope. I have never heard of Nix OS before. In fact, you are the first one to inform me of the existence of this Linux distribution.
Great explanation of how it works. Some other videos were a little lacking in that department. I'll be interested to see how it all goes for you on your production machine moving forward. I don't think I'd be comfortable with it just yet.
You can even run stable and unstable together, so if you want you can boot into stable, and then reboot into unstable, pretty cool idea, you can basically switch between running a fixed release and a rolling release.
THANKS, Nicolas!!!! You, your channel, simply keeps on getting better AND better as you've progressed! Bravo!!! Now, with this intro of NIX OS, it may be time to sever my time with Fedora (and RedHat) and take a serious look here. Much appreciation!!
I love seeing these amazingly powerful distros But I think I'll stay in arch for like... Forever I know how to use it and it just works, I don't see the need for generations or constantly needing to edit the config file, I already have enough configuring my hyprland setup
Hah, the joke is you only have to edit the config file once. I have mine setup down to the configuration of my browser, my bootloader, my editor, the Nvidia drivers and the exact set of apps I use etc. It’s so stable I even use it’s automatic update option. It’s one of only three distros I trust with unsupervised full system updates.
It's precisely because of the annoyance of config files that I use nix. In nix there is one config file. In other distros there are dozens to keep track of / bug-fix. I hate configs. I love nix.
Wow! Absolutely worth my time watching this, as a home lab owner i always configure some basic things like MySQL, Apache and stuff, i just found out about NixOS and NixOPS which will make this process even simpler than setting upp a template from a VM or LXC/LXD container. With the correct configuration i can just backup a single file and with NixOPS just deploy a new machine that meets my requirements instantly. A huge eye opener for me. I'm going to try and replace some Ubuntu machines after playing around with this some more, just to get the feel for what I'm doing, forget about docker and all other unnecessary configurations in my home lab and just dive straight in to NixOS 😀super simple to get things up and running.
If you think NixOS looks interesting then also have a look at GNU Guix! The two are very similar in principle but have a bunch of nuanced differences. I think for tinkerers GNU Guix may have the edge as it is configurable with the powerful and easy to use Lisp dialect Guile.
@@gotoastal I understand that! My favourite language would have to be Haskell and my preference towards ML-like languages definitely carries over to Nix. I also learned Haskell before Lisp! But once I learned Emacs Lisp, the pile of parentheses started to make sense and I saw how absurdly powerful Lisps are for interactive systems and as configuration languages. Regardless of whether you're interested in GNU Guix or not, if you're interested in programming languages, I highly recommend checking out a Lisp or two as they are very unique!
Nick, Thanks for this walkthrough on NixOS. I have had this on my radar from listening to the guys over at Jupiter Broadcasting. I might be looking to get into this in the future and having this a as an intro is helpful. Much appreciated.
Solid video, been using nix for last 1.5 year and it has been very good. 40 flatpaks, just steam and game things. Best part I didn't have to build xanmod kernel it came from the cache server. Did build those my self on arch(btw). Right as the nixos needs more funding and support from community the video could not have been at a better time! at the release of nixos 13.05 =).
Fantastic description. Really appreciate the video, Nick. It would be great to have a similar, perhaps shorter video on what nixOS means for Docker images. I do understand that may not be your audience though.
System wide Test environment is pretty tight. The application try before you commit system is equally neato. NixOS is definitely targeting developers, but it has it all under one roof. Had looked into the OS previously, but this video sealed it for me; good stuff!
It's sad that their approach of handling dependencies is treated like devil's work by other distro devs like the Debian devs that really hate package bundles.
@@Daniel_VolumeDown A bundle would be a package with all the dependency references. It would fetch the onde it needs and can be shared as a single file without the repos. Just like a .flatpak file.
Nix doesn't use package bundles, it has a /nix/store directory which contains all the packages you have, something like /nix/store/[long hash of the package]-emacs-28.2. Such a directory contains the typical dirs like /bin /lib /etc and so on and those dirs get symlinked together to create your user profile or system profile.
I really like NixOS! While I have successfully installed it on a computer, my favorite use-case is *still* being able to use it like a generalized Python's VirtualEnv/Pip or NodeJS NPM system for maintaining the versions of libraries you're using for a particular project -- only, with NixOS, you can customize *everything* ! I also love that this feature of NixOS -- that it can be used as a package number on pretty much *any* Unix-ish system -- can be used as a way to get comfortable with the NixOS system in general, while *still* using your favorite "easy" Linux Distro, which can be a stepping stone for installing it on a computer.
If you count non-unique packages (so packages at least one other repo has, helps filter out some cruft pretty much no-one uses) nixpkgs has more than the AUR 🚀
Great exposition and amazing summary of the features! The reproducibility and the reversibility of the installation are KILLER FEATURES for developers and workstation users ! And image what issues solved for embedded systems !
Great video. I've been all-in on Linux about four years now, and I've had a lot of fun distro hopping and tweaking my systems. But after all this time, maybe I'm getting burned out on the endless tweaking and adjusting. Having lost count of all of the deb-based, arch-based, fedora, gentoo, SUSE and all the rest flavors, including the source distros, I've gotten very friendly with the command line. But now I actually need to get productive work done, and my work isn't in the development field lol. You can't know how much I wish I'd known about Nix when I started out so that the setup duplication across my five laptops would have been so much easier! When I finally have time for basic raw experimentation again I'm going to learn this inside and out. Right now though I'll have to stay with what I've already established. I enjoyed the video!
Also the fact that if you use flakes to build system or environment along with it actually "kinda" (emphasis on kinda) forces you to ensure that your changes are added to git.
@@aqua-beryit’s not an issue, just use a filesystem with compression and deduplication built in like btrfs and keep to like 5 generations which is plenty.
I absolutely love NixOS, I found it by accident when I was trying to install a package on openSUSE that was not available on official repo, neither on packman nor on homebrew. Sadly I had to go back to Arch Linux eventually, Nix does have way more packages than AUR, but it doesn't have all the packages that AUR has. The thing is, I can use Nix on any Linux distro, even Arch, but I can't use AUR on NixOS, so what I ended up doing was to install Arch Linux and Nix (the package manager), that way I will always have everything I need. Still I miss NixOS as a distribution and I thinking about going back to it (If openSUSE don't convince me of sticking with it bc Arch Linux is giving me some problems lately and openSUSE is already there for any emergency). On the matter of using the unstable channel: you don't have to fear anything, the system is as rock solid as it would be in stable, the problem is that sometimes you will not be able to upgrade your system. When something breaks on unstable in a package that you're using, you will not be able to reproduce the package locally either, which means that the worse that can happen is to end up with an outdated system for a while, or not be able to install the packages that are broken (packages that depend upon it may be fine if nix didn't updated the dependencies as well). In cases that unstable is broken, you can still install packages from stable channel, this is what I did back then when some packages were broken and wouldn't install, just use the packages directly from stable channel, that's the advantage of NixOS' isolation. Another big advantage of NixOS is reproducibility, which was one of the biggest concerns that inspired Flatpak and Snap (and AppImage somehow), in the terms that if a package works on my machine, it is guaranteed to work on yours as well. The interesting part of NixOS for me is: Instead of distributing packages in binary form, they distribute a Declaration of the package (Expression), which is basically instructions of how to build a package and what are its dependencies (which are also expressions with their own instructions), using a language that is also purely functional, and instead of just distributing the binaries like regular distro does, they distribute the expressions. To solve the problem of having to compile every package you install, they've built Hydra and Cachix, Hydra builds all the packages, Cachix stores the artifacts/binaries. Additionally you can build packages with your own configuration, although it's almost guaranteed that you will need to compile them because Cachix does not have all variations of configurations available, it just has the default one if I'm not mistaken. The other advantage is that they can also provide non-free packages, even the ones that do not allow binary distribution, they just give you the instructions (Nix Expression), and let you build the package locally, which is completely legal, way better than just not having the package at all (like some distro were forced to do to avoid being sued).
Recently the nixOS team has been facing severe problems with server hosting costs due to their sponsor being bought up. Look it up, it'd a big problem. If you could help them sort things out you should definitely help out
They are not "severe problems". I don't know who started this false meme. The existing sponsor is coming to the end of the sponsorship, so they are looking at other options. The distro is not in any way at risk.
This is the brass ring for sys admins I know nothing about Linux admin but I can see this combined with vanilla os concepts, bare metal hardware, and bulletproof backups eliminating a lot of headaches
Nix kind of isn't really a package manager. It's more like a build system, and NixOS is "just" a single absurdly configurable package. You can technically build NixOS on any system with Nix installed, but naturally it's hard to actually install fully without overwriting the existing system. Using NixOS honestly gives me a similar feeling as Rust in a key way: both provide heavy restrictions on how one can do something, but those restrictions also allow me the freedom to do things that I probably wouldn't dare attempt with other systems. Specific to NixOS, if i ever feel like tweaking my system, I can do that in a simple and reversible manner. If it doesn't work out, info the changes and move on; if it does, then i can trust it to work until that itch returns.
Try out Kasm Workspaces to stream desktops, OSes & apps to your browser: www.kasmweb.com/community-edition
And then Sauran said, "One config file to rule them all and in the darkness bind them." Oh how the analytical nerds love their single shot one size fits all poopchute solutions. There go all the chmod permissions and user access controls that the Founders built to keep our systems from getting hijacked and booted off the Internet. Congratulations you rebuilt Windows, disgusting.
Lol, we launched a NixOS video on the same day. I had a blast using this as my main distro for the last month. Next up... Debian 12.
Hahaha yeah, I saw that 1h before I published, I finished my video 6h ago 😂
Great minds think alike! I loved my time with Nix, and it’s definitely going to end up on my main editing rig!
Hi titus
Debian 12 with Nix package manager?
Three words: Documentation, documentation & documentation.
Seriously, figuring out how the finer details of nixos work is WAY harder than it should be.
The manual is pretty well detailed, I think, but I had a hard time grasping the concept initially
@@TheLinuxEXP The manual is great for initial installation and managing a single system. But as soon as you try to go beyond that (say nixos-rebuild remote deployment, flakes or what have you), the documentation becomes forum posts and source code.
It's very powerful, and I've used it quite a bit on home servers, but most documentation talks about the high-level operation of a nixos system and does not talk about the finer details. It's kinda like having a tutorial but no manpage.
And all of the docs for nix are pretty much oudated because the `nix` command is still "experimental," so if you start out without knowing anything you'll probably begin using things like `nix-env` without knowing the compatibility issues
@@TheLinuxEXP agreed
@@gtsiam Yeah, Flake is such a headache to understand. Unlike the .nix config file, it doesn't have a great guide for how to get it working. I honestly just gave up and will only use anything that could be simply imported as a module instead of messing with flakes and overrides.
I started using NixOS a few months ago and the moment that made me realize how powerful it is was when I added
gnome.enable = false;
plasma5.enable = true;
to the config and rebuilt then my whole system switched to KDE without any issue, it was like magic.
Since then I've started learning how to use flakes to setup dev environments inside of every project I have that way I can use direnv to automatically load the flake with a shell environment with all the dependencies (and the right versions too) for that project when i cd into the directory or open it in vscode.
Agreed. Super awesome to just cd and have direnv do the rest. Also super nice that they have flake templates on the github so making a rust project or something takes like 20 seconds total to set up
I prefer to just comment out stuff over marking something as false ngl. Also, IMHO the most powerful aspect is when you use home-manager... and then use that one config file to recreate all your configs through all your devices. It's great.
I have been haling problems setting some programs over NixOS.
I love the sound of that-- especially the gnome enable-false!!! That should be in ALL distros.. :) (sorry, but I just HATE gnome).
Well how is it different than something like pipenv or npm?
I've been using NixOS for just over a year now and it's nothing short of life-changing. I'm constantly switching between my desktop PC, my home server, my work laptop, and my personal laptop. With NixOS (and flakes, and home-manager) my entire computing life has been moved into a single git repository. Everything from the desktop apps I have installed, to my GNOME hotkeys, to my shell plugins to ssh config (which automatically adapts to the address/ports I've configured for my other machines) is all controlled in once place and seamless to sync between every machine. It's incredible that an operation as complex as "I want my home server to export NFS shares safely tunneled through Tailscale to all my laptops and regularly backed up with restic" is now just a commit in a git repository, just like adding a feature in any other coding project. And now that I've done it, it's perfectly reproducible. If I ever get a new laptop, every setting will be exactly how I want it, and all my NFS share will mounted and ready-to-go from the moment I install the OS!
So you are one step closer to having all zero clients, like we use with Vmware and Windows machines where we have one "Golden image" and everyone who signs in gets a clone of that image. ^_^
Or in Windows where you have start-up scripts that map all your drives/printers/syncs your desktop/documents, etc. Very good.
I'm all about one step setups, they take a bit of time to get configured the first time but the ease of use is great. If this avoids a lot of license costs, this could be a great idea for a lab environment where we need to rebuild a test system often.
Have you ever tried GuixSD? Im really curious to know an opinion of GuixSD from a NixOS user.
Im thinking which one to choose.
Big deal! I can blow out my MacBook and resurrect it back in a few minutes once MacOS is installed. All my files are replicated across all my Macs, iPads and iPhones. I don't need to learn a programming language to do it. You Lintards really like making a big deal out of nothing. Your OS and software are inferior, yet you keep polishing Linux Turf. Get laid and get a life!
You tried in vain, although you are absolutely right. He won't understand a damn thing you said)))))))
@@Artimidorusyeah but windows updates are a bear and always break my stuff. So, there’s that.
This kind of "configure once and clone for free" is so valuable feature in corporate environment that I cannot overstate it enough. The ability to reproduce very quickly known working OS installations with all needed tweaks across different hardware is badly needed in servers, virtual machines, office computers and pretty much everywhere.
Right? I've been thinking a lot about how you'd go around building a sustainable business out of this. So far I can say it's a lot of work, and I mean a lot :) You'd think things are 90% of the way there, well yes maybe, but also all the plumbing is there and none of the porcelain - app stores, the sync / update / upgrade actually working well (without CLI), graphical config, tuned hardware support (10 hour battery life), tuned prebuilt modules to support cloud remote desktop infra on various providers, security, automated ISOs ...
Same line of thought for consumer desktop OS that works really well, perhaps on a small curated set of hardware. Also so much potential and also a lot of work.
Certainly the tech brings so much opportunity to build on top of it. I hope people go wild, be successful and we see some amazing products out there in a few years.
I find pretty interesting the whole theory behind Nix and NixOS concepts, the original Eelco Dolstra thesis how can we apply the functional programming concepts into a operating system, and problems found in software development such as side-effects and mutability can also be found in deploy systems, and thus Nix and NixOS becomes sort of a "programming language" but for managing systems, where expressions and functions evaluates to a systems state (declarative way). Whereas using normal operating systems like Windows, Debian or Arch are like doing everything in a imperative way.
This solves many issues but also introduces a new abstraction layer between you and the system and some engineering problems, the project has actually evolved a lot and developed new tooling such as Nix flakes, but being officially stated as "experimental" divides the community into two large chunks of people (those who use it with the new "nix commands", and those who are using old tooling which has some issues)
Also, a lot need to be done to make these concepts easier to grasp for new people to learn, documentation can be better. Also, the declarative way of configuring systems in only one place can be done through a GUI which edits the configuration.nix file and applies then for the system.
This is actually crazy. I installed Nix-OS for the first time yesterday. I've had a blast learning about how to set it up and I've just been building my own little system and all of a sudden this video gets posted. This could be a sign that Nix-OS will be my forever distro of choice.
Chris TItus also published a NixOS video today
@@Being_Joe ikr.... first i saw titus posting this.. and then him...
This is all an Illuminati conspiracy 😂
"my forever distro of choice" ... Famous last words, though the same untill I watched nicks Debian video last week 😂
@@vaisakh_km Same
You can even have multiple channels in use at the same time! Most of my packages are from the release channel but a few are from unstable and it works flawlessly.
It's not a perfect choice though, because for the rare few packages that are unavailable in the repos it's not simple to build your own package initially and it's also unlikely to work with a prebuilt executable because linking works differently. But overall, it's an amazing distro and I have my eye on SnowflakeOS which is meant to be a more user friendly, GUI centric flavour of NixOS.
worth noting that prebuilt executables _mostly_ work with things like steam-run - (and of course appimages with appimage-run)
(and nix-ld if you can figure that one out)
it's also worth noting that for certain language ecosystems (rust, ocaml among other things) it's *mostly* a matter of just either using a single function call and specifying where the language's manifest is, or cloning a template and doing the same
Nix looks incredibly powerful, A tweaker's dream system perhaps. The amount of control one is given is incredible. All while remaining manageable and not getting too crazy complicated. The average user probably never has to touch these tools, but for an advanced user that likes to tweak things this has all one can desire.
Been on it for a year and a half so far after going, hmmm, ubuntu -> manjaro -> popos -> arch. It really feels like the "Ultimate" Linux, the "final distro hop" for me.
The nice thing is that normally, Linux is so configurable that it is easy to get yourself into a situation where you are screwed because you've created an untested state/configuration, but thanks to nixos's features, you are protected from that... which basically means you get both the massive configurability of Linux but WITHOUT having to pay the (quite severe IMHO) cost of the risk of screwing things up since it's all declarative and you can rollback atomically and at boot. So you get the best of all OS worlds basically. For example, in any other distro I would have NEVER messed with things like Plymouth or changing the boot loader or switching window managers, etc.... because I would have been afraid of being hosed at boot and having to go through the pain of booting off a USB key and spending a day troubleshooting and fixing it. Now, I have a neat animation at boot thanks to a declarative Plymouth config! AND I tried a few other window managers without any issue! AND I have ZFS on root which I wasn't able to get working reliably in any other OS but Ubuntu... but even there, it eventually slowed down to a crawl whenever I did an apt update because it made ZFS snapshots every time in order to enable rollback from a bad update, which is of course completely unnecessary in NixOS =)
This could be just me personally but man, you're nailing those videos lately. The last couple of videos have been about perfectly what I was interested in or currently testing. Great work!
Thanks a lot! I’ve been putting a bit more time into trying to find topics that really have some potential (and also that interest me), and I’m trying to up my editing game a bit as well!
@@TheLinuxEXP It's definetly appreciated! Watched some older videos recently and you can see just how much you've impreoved
I concur. I've generally enjoyed this channel for about the past year, but it seems like he has upped his game recently.
Nick talks about all the config being in a single file but actually you can make your config modular and use as many files as you like, which can be conditionally included based on the hostname or some other characteristic of your system. That's how I manage config for multiple machines (including specific differences for each) in the same git repo.
I've been using NixOS for 9 years! Absolutely love it. Run it on everything. Servers, desktops, game consoles, ereaders, phones. Everything!
A measly 6 or 7 years here ;)
once NixOS clicks, it sticks!
E readers!!?? Why
Phones ?
Also, you can use home-manager to manage your nix install on other distro, and to use several options that can be used to manage user-level configs and home files. NixOS have really changed how I use my device, and now, I pretty much do declarative everything... home-manager, ublue-os, conty, even flatpak to some degree.
Also, sheesh, anything longer than a paragraphs really starts to get potentially auto-removed by youtube for some reason. Dunno why this happens only on Linux channels, but man, I wish I know what's the limit other than a general "keep it visible on mobile".
I'm glad you mentioned ublue-os. fedora's idea to use docker/podman/oci containers as the source of your base os (and future work on bootc) is game-changing IMO. I always wondered why folks were investing so much in immutable distros but now they make so much sense.
@@lordofla Yup. To prove how right they were, even Microsoft is slowly trying to containerise everything. From app, and if possible, to their OS. As usual, they steal ideas from Linux that many Linux users didn't even look too much into.
Indeed, the possibilities are endless. My user config shares a common home-manager config for all my Linux systems and a Mac, for the latter I just include only the compatible parts, and in some cases it even filters some nix expressions (at build time) from the config to make it suitable for Mac. So any config change can be applied to all systems with just one commit and one rebuild (per system). With flakes you can even directly switch from your git repo (without manually downloading anything)
Any thoughts on choosing u-blue vs nix for someone who is comfortable with git/CLIs, but had historically used a Mac?
I should mention for those who want to install the nix package manger in other distributions. Hardware acceleration is not officially supported on non-NixOS distros because it is not reproducible by modern gpu designs. There is a nixgl, but it is not very well tested because the developer needs access to different hardware types. It also feels hacky from the user's perspective.
Honestly seeing this concept of 'restoring the system from a config file' sounds so great i wonder why not more OS have this in the first place.
It really makes a lot of sense!
System admins been doing this for ages... just from the "outside" and works for any distro. (Ansible, puppet, salt...)
Also gentoo was sort of the same, but even more complex :)
In order for nix to work, it needed to do a lot of tricks which it's no easy, also, Nix does follow the FHS pattern entirely, which makes you needing to package the software in the "Nix way" in order to run it, since our applications and programs do a lot of side-effects on the system which Nix is against it
Because it is very, very, very difficult to do. NixOS as a normal user is simple and beautiful. Once you start to get into overrides, flakes, and other configs? It starts to get messy. The NixOS packages undergoes a LOT of testing to make sure that everything is always build correctly. And when they declare dependencies? It's done through modules -- that means, it's not just one module have to be right, EVERYTHING has to be right and will build reliably.
Imagine if AUR PKBUILD references other PKGBUILD directly, and have a requirement to always build correctly and reproducibly. And yet, anything less could mean your system fails to build. The maintainers has done a lot to make it seem so simple from user perspective, despite how it's still quite complicated to get into.
Alpine has /etc/apk/world
(but this will only back up the packages you want installed. Not your configs and stuff
I've had a great time using NixOS on my work computer.
My basic setup is to use NixOS for the system and DE, then everything else is run as Flatpak.
Best of both worlds. Unbreakable base with unlimited rollbacks, plus up to date desktop software updated independently of each other.
It's like a dream come true.
That’s definitely how I would use it as well
I do that for my gaming pc except I use home-manager instead of flatpak to install all my user specific programs independently and declaratively. Either one probably works great though.
"All apps are installed through flatpak" (specifically Flathub) seems like both a really desirable setup AND a great way for a new distro to offload a huge chunk of the (ultimately redundant) work that goes into maintaining their repo. Surprised I haven't heard of any distros that are set up to work that way.
@@stevethepocketi don't know if that counts, but as far as I know steamOS for the Steamdeck is set up in this way
Too bad dbus-reliant Flatpaks are broken on NixOS and won't launch (like Loupe, for example), and some are shittily made like Slack, which for some reason can't find my Adwaita cursor, so I'm stuck using the one from Nixpkgs.
After all these years experimenting with Linux, it finally happened, The Linux Experiment channel finally released its own Linux distribution: Nick's OS.
Jokes aside, NixOs is an interesting concept. Having your Linux configuration backed up and available to take with you however you like seems pretty neat.
Ironically, that actually happened. GNU GUIX (pronounced 'geeks') is very much influenced by NixOS. Except instead of a DSL language it uses LISP Scheme Guile so the learning curve is higher. NixOS uses Systemd while GUIX uses GNU Shepherd. An all Snap version of Ubuntu is coming soon. Other immutable systems are out there as well, each a bit different design but sharing many of the same benefits.
@@matthewstott3493 A part of me really wish they used yaml or at least accept that through a module of some sort. I really liked the design of fleek, and it would have made things simpler for people to learn, but fleek is very limited right now and I feel like the main user-facing nix config, at least, could've been made in that easy-to-read playbook format.
LOL !
oh.
NOW I GET IT....
now i cannot unhear it. thanks.
Intresting to finally understand what Nix is all about, hope it stays relevent and that other distro's take from its ideas about simple deployment, and rollback capeabilities :)
I Hope so too! It’s not super easy to use at first, but the concept is really cool!
They are - ublue-os have stated some Nix influences, even if they use a different principle in the way they did things, and VanillaOS is working with them to bring the same workflow to their OS. Also, both of them are huge fan of Nix and makes installing the package-manager easy on their distribution. The idea of reproducible, declarative, immutable OS with easy rollback and deploy is slowly being adopted by many, and Nix is definitely an influence.
This method of having a configuration that stores the packages you installed could mean that other people could make their own "spins" on the distro.
NixOS by default doesn't actually have much. You are supposed to make you own spin and the Nix package manager helps you do it
Yes, this I imagine is where the inspiration for ublue-os comes from. You can just... declare everything through a text file, and it'll build an image for you. It's practically is a custom distro, as I manged to build a ublue-os based on Kinoite but with WhiteSur theme and default layout, plus all of my preferred configs generated by default thanks to skel files.
I think their configuration file idéal is really good and will be much easier to backup. But I do think for more adoption they will need a simple to use gui option.
I've installed NixOS yesterday and I am amazed.
I'm starting to understand the home-manager and flakes... Everything around NixOS looks awsome.
I'm just having an issue installing a proprietery trading platform (that works natively in linux.. I've used with other distros).
I'm still trying to figure out to solve this...
I hope I can make it. I'm having such a great experience that I don't want to go back to other system :D
can you describe your issue in a little more detail? i’ve been using nixos for about 6 months and i might be able to help
Resort to distrobox?
The learning montage was amazing.
Hahaha thanks 😅
Very well done, hands down the best summary by a "Linux mainstreamer" (by no means meant in a bad way! I enjoy your videos even as a veteran!). It focuses on the actual main points. For part 2 home manager and the concept of devShells would probably round out the main benefits. As low hanging fruit: real configuration management simply by keeping your config in git. Also a huge benefit: you can comment your configs with things learnt/problems solved, so on the long run you'll never have to research the same solution a second time: a well invested learning curve, even when steep.
One neat thing about Nix that I've been enjoying a lot is the ability to try out packages, without installing them at all! The "nix-shell" (or "nix run" if you use flakes) command temporarily adds a program to your current shell session, and when you exit its gone. That, together with being able to share my entire systems configuration on two NixOS machines and a Macbook, makes it the perfect distro for me :)
Random note: Nix syntax is based on Haskell, a purely functional general programming language. The word "function" used in procedural languages usually means "procedure". Functional (or purely functional) language families aim for the same reproducibility (proof of correctness), immutability (resilience and consistence), declarative style and isolating anything that has side-effects into the smallest tiniest possible attack surface that can't be validated by machines-algos but are easy to peer-review by humans (side-effects = modifies the "universe" in any other way than just being returning a deterministic result ofthe same arguments).
Honorable mention for Guix, from the GNU, which uses Guile, a Scheme language (Scheme is a LISP cousin but with pure functional orientation, while LISP allowed for side-effects)
I appreciate this explanation, TIL! I've heard of functional programming and Haskell before, but always struggled in seeing how they are different in approach/nature to more conventional types of programming.
As a Haskell programmer... I have no idea how they came up with the Nix syntax. It's alien.
NixOS is not the next arch. It is an entirely different monster. Once you understand how it works it's both easier and more stable than arch ever was, not to mention far easier to recover if something goes wrong. However, a major drawback of Nix and something arch does well is documentation. NixOS seems to be improving on this but it still has a long way to go. Also configuration of some applications can be difficult, mostly because documentation is lacking.
Arch was never stable at least in terms of updates, which for me regularly break every 3 months.
@@showlottathings Yeah, that's pretty much my experience as well. You can set it up to back up/snapshot and save most files to git-hub for when something goes wrong because it will. But NixOS is so much easier in this regard as automatically does this. It turned out I was spending almost as much time working on tinkering/recovering/updating/etc.. then actually getting any work done. If that's your thing fine but I'd rather have a stable system with automatic back-ups whenever anything changes that can be duplicated across all my systems at the same time. NixOS excels at this.
Yeah, documentation for Nix is super strange imo. I switched to Guix and it's way easier.
@@9s-l-s9 Correct me if I'm wrong, but I thought Guix is a package manager? I've never used it so I'm not very familiar with it. Nix is both a language and a package manager but NixOS is an OS. Strangely this actually makes looking up questions about NixOS a little more difficult as often searches bring back results about the package manager and not the OS.
@@Ryan-ff2db There's also Guix SD (or is it Guix System now?) which is an OS.
Gotta say, I've been getting into Linux the past couple months, and this here, looks friggen amazing.
Great video showing an overview of everything. Definitely going to look into Nix OS.
I wanted to reply because.. I’m an internediate+ Linux user starting with nixOS. Your video answered ALL my questions - with just enough info to let me learn the rest MY WAY. You helped me understand configuration.nix vs nix-env. I finally understand what flakes can be used for. Most importantly, I now know that I want to use home-manager. Even after my little nixOS use, I think it’s going to be my new way forward. Great content; your videos are awesome for newbie to power(-) users!!
Damn, I thought nixos was some experimental niche distro but you just sold it to me, I'm trying it now.
Yeah I also thought that, but turns out it’s old and very well established!
Happy to finally see a video about it from you!
I've been using it for many months now, and its pretty great, and super stable! But the nix language still seems way more complicated than it needs to be, and they really could've avoided making their own language I think.
I find it very legible, but I will need to look online to see how to write my config file on my desktop
GNU Guix System is based on a fork of the Nix package manager that uses the Scheme programming language. You get to use a REPL based development workflow for your config. Much more experimental/messy than Nix though (e.g. you don't get the default Linux kernel, you get Linux-libre, you can't roll-back per package that easily; etc.) so I don't recommend it for most right now.
@@KabeloMoiloa there's an unofficial repo called nonguix, which contains the default Linux and some other nonfree or otherwise problematic stuff (like Firefox with its weird trademark situation)
I think that Nix OS is technically one of the best, if not the best distro. I tried it a few years ago on my laptop and I said that I would switch to Nix OS if my arch linux broke and I couldn't fix it in 5 minutes. However, since arch has been easy and quick for me to fix I have yet to switch to Nix OS.
Last video: “Linux needs a system backup tool.”
Me: “I write a bash script to set everything up for me on system install, so ye?”
NixOS: “I am three parallel universes ahead of you…”
TYJ for Nix!😊
Thanks for the TYJ! Made my day!
this is definitely cool. love a distro that actually adds something unique, rather than just ricing debian or arch and calling it a day.
I will try it. I have heard of it and I know I have the iso downloaded. Thanks Nick. Great lesson again.
This looks amazing ! I'm definitely giving this a go. Thanks for this video.
Thank you for picking up on this distro & evaluating it!
ROFL the learning montage, great as always Nick, as a dev this does sound very attractive
Hahaha glad you liked it 😅
Best part of the video
Glad to see this video recommend on RUclips! I've been using NixOS since 2017 It's mostly been a good experience. Hoping more people catch on to it's cool features and unique approach to system building.
It's a neat concept, but ultimately I think rpm-ostree is more approachable in that regard. It also lets you define your operating system in a Containerfile (some call it Dockerfile) the same way you do with any container. And then it can be easily reproduced. I can see why Guix/Nix would be appealing, but the industry has moved to OCI containers. And rpm-ostree allows you to use this same technology for operating systems!
yeah but Nix is reproducible docker is not
hell Nix can even build your OCI image to make it reproducible & therefor not shitty
As a user of Linux since discovering Redhat in 1996 why have i not switched to Nixos already? A great video. Thank you, and I love your comedy moments. Makes me laugh😅.
The thing I think not mentioned in video, is that you can edit the config using any text editor, including VSCode. You only need console for running rebuild etc
But your editor of all things should be free software which VS Code is not. Tracking… in my editor… I think not.
@@gotoastal which is a non-issue because of forks like vscodium :) vscode _is_ foss, you just have to tear out the telemetry yourself
Man, this is too much work for a lazy man like myself.
Also, I absolutely love how their package manager can be installed on other OS's beside Linux. Just like a boss 😂
Hahah yeah it’s not for people who just want a plug and play experience! It becomes plug and play for any system after you spent time building your config
I might actually mess with it in a VM and see if I like it. Thanks for explaining it the way you did, Nick. It actually never made sense to me until I watched your video. Much appreciated 👍
Matthew Croughan mentioned a friend of his who installed the nix package manager on arch, then installed pacman using nix!
@@roku1 Inception of Package Managers!
Been using Nix for a little while. It's the defacto OS on my MS Surface and main gaming desktop.
I am also trying it for the first time this week. A few hiccups but liking it so far.
This is a very compelling system. I never looked into Nix closer, but the way you describe it is something I will consider. The complete and reproducible control, with the states I can go back; man that's a dream. But how does it compare to other immutable distros? I think the single config file for reproducible installs is the killer feature others don't have. Super interesting.
I am considering using nix (the package manager) since I used to daily drive NixOS.
@@socvirnylestela5878 But then you have two competing package managers for the system. I am not sure if that is what I would go with. I didn't consider using nix on other distros than where it is native to.
How does it play with the rest of the system? Because of the immutable nature. Really need to read more about, that's confusing to think about. :D
@@socvirnylestela5878If you do it that way, you cannot rollback because you're using imperative on an a declarative system.
The differences between NixOS and other immutable distros are basically.
1. NixOS is completely immutable, most others have at least /etc read write, on NixOS you manage that through your one or more config files as well.
2. Rollbacks regardless of filesystem, you can use ext4, xfs, whatever, you're not limited to one, unlike in other immutable distros which all use Btrfs.
I hope this video will make Nix more popular. Sometimes it is a pain not being able to run random binaries, but everything I need is packaged. The packages are reproducible and generally really good.
I use GNU Guix btw
(and it's so much cleaner, simpler and better documented)
Thanks! NixOS review is exactly what I've been asking for, amazing vid!
I always love when Nick-OS post a new video
😂
Nick’s OS
7:12 great video! This transition made me think something fell in my house though 😅
Great introduction video to NixOS! I would love to see a follow up video of your longer term usage thoughts (maybe creating a more modular config?), and/or going into more depth on less documented information and tools, like flakes and new nix command (nix-env -iA is not recommended anymore 😅).
One warning I will give potential users is that it can be tricky to know if an issue is due to Linux or NixOS. For example, you cannot simply run a binary you download from the internet without some work.
Many thanks for this.
Just happened I installed NixOS on a RPi 3 yesterday and was all pleased.
+ thanks for mentioning Tuxedo 🐧
If you've ever used ansible and thought "if only my OS just worked like this from the start" that's basically Nixos. You spend more upfront time configuring things, but you get peace of mind, self documentation, immutability, and automation in return. But it is *a lot* more upfront time, and not without its own oddities and frustrations. No OS is perfect, but Nixos has gotten much closer to perfect for me than any other OS I tried.
But you can do the same thing with Ansible, no? It also allows you to set up your packages, services etc.
Best NixOS intro I've got to date. I'm glad you shed the light.
Like that nix is getting recognition it deserves. I recommend you to dive deeper to new nix commands (not using nix-env), configuring system as flake and system's partition using disko 😉
This is the best explanation of what NixOS is _actually_ about that I have seen so far. Thanks!
Thank God finally a distro with independent dependencies.
What a good distro for devs using Linux and for general linux power users.
Always a good day when Nick uploads
I wish I could do so everyday!
That was the very best explanation about NixOS I ever saw. Congratulations!
Thanks a lot! I tried to be as simple as possible, but it’s not an easy concept to explain!
NixOS is awesome, but docs sucks they seriously need something like Arch Wiki , if you creating a distro which is so different than other distros, good and updated docs is must. Recently I was trying to build software written in Swift and it was horrible experience, so it is good untiil you are trying some exotic stuffs
0:04: "You probably have heard about Nix OX"
Nope. I have never heard of Nix OS before. In fact, you are the first one to inform me of the existence of this Linux distribution.
7:10 that was unnecessarily scary (0_0) 😂
Great explanation of how it works. Some other videos were a little lacking in that department.
I'll be interested to see how it all goes for you on your production machine moving forward. I don't think I'd be comfortable with it just yet.
Been using it for a while now, solid experience even on the unstable branch
IMO unstable is the best choice, if something breaks just roll back
@@formbi and it hardly breaks anyway
Ofborg do be great
absolutely! unstable on my laptop and 23.05 on my server. Documentation is sometimes lacking but otherwise really really happy
You can even run stable and unstable together, so if you want you can boot into stable, and then reboot into unstable, pretty cool idea, you can basically switch between running a fixed release and a rolling release.
THANKS, Nicolas!!!! You, your channel, simply keeps on getting better AND better as you've progressed! Bravo!!!
Now, with this intro of NIX OS, it may be time to sever my time with Fedora (and RedHat) and take a serious look here. Much appreciation!!
I love seeing these amazingly powerful distros
But I think I'll stay in arch for like... Forever
I know how to use it and it just works, I don't see the need for generations or constantly needing to edit the config file, I already have enough configuring my hyprland setup
Hah, the joke is you only have to edit the config file once. I have mine setup down to the configuration of my browser, my bootloader, my editor, the Nvidia drivers and the exact set of apps I use etc. It’s so stable I even use it’s automatic update option. It’s one of only three distros I trust with unsupervised full system updates.
It's precisely because of the annoyance of config files that I use nix. In nix there is one config file. In other distros there are dozens to keep track of / bug-fix. I hate configs. I love nix.
Wow! Absolutely worth my time watching this, as a home lab owner i always configure some basic things like MySQL, Apache and stuff, i just found out about NixOS and NixOPS which will make this process even simpler than setting upp a template from a VM or LXC/LXD container. With the correct configuration i can just backup a single file and with NixOPS just deploy a new machine that meets my requirements instantly. A huge eye opener for me.
I'm going to try and replace some Ubuntu machines after playing around with this some more, just to get the feel for what I'm doing, forget about docker and all other unnecessary configurations in my home lab and just dive straight in to NixOS 😀super simple to get things up and running.
If you think NixOS looks interesting then also have a look at GNU Guix! The two are very similar in principle but have a bunch of nuanced differences. I think for tinkerers GNU Guix may have the edge as it is configurable with the powerful and easy to use Lisp dialect Guile.
Guile and LISPs are what scares me from it. Nix is an ML which is more readable and ergonomic to me than that pile of parentheses.
@@gotoastal I understand that! My favourite language would have to be Haskell and my preference towards ML-like languages definitely carries over to Nix. I also learned Haskell before Lisp! But once I learned Emacs Lisp, the pile of parentheses started to make sense and I saw how absurdly powerful Lisps are for interactive systems and as configuration languages. Regardless of whether you're interested in GNU Guix or not, if you're interested in programming languages, I highly recommend checking out a Lisp or two as they are very unique!
Nick, Thanks for this walkthrough on NixOS. I have had this on my radar from listening to the guys over at Jupiter Broadcasting. I might be looking to get into this in the future and having this a as an intro is helpful. Much appreciated.
Solid video, been using nix for last 1.5 year and it has been very good. 40 flatpaks, just steam and game things. Best part I didn't have to build xanmod kernel it came from the cache server. Did build those my self on arch(btw). Right as the nixos needs more funding and support from community the video could not have been at a better time! at the release of nixos 13.05 =).
Fantastic description. Really appreciate the video, Nick.
It would be great to have a similar, perhaps shorter video on what nixOS means for Docker images. I do understand that may not be your audience though.
I will throw a rock, and there's a 69% chance that it'll hit someone who's trying to build a GUI for nix configuration file
Hahaha yeah that’s very likely, but I don’t know how this could work!
System wide Test environment is pretty tight.
The application try before you commit system is equally neato.
NixOS is definitely targeting developers, but it has it all under one roof.
Had looked into the OS previously, but this video sealed it for me; good stuff!
It's sad that their approach of handling dependencies is treated like devil's work by other distro devs like the Debian devs that really hate package bundles.
Yeah, and people who don’t like Flatpak and other similar formats probably won’t like Nix as well
What does package bundles mean here? Does nix do not install all dependencies separately?
@@Daniel_VolumeDown A bundle would be a package with all the dependency references.
It would fetch the onde it needs and can be shared as a single file without the repos. Just like a .flatpak file.
Nix doesn't use package bundles, it has a /nix/store directory which contains all the packages you have, something like /nix/store/[long hash of the package]-emacs-28.2. Such a directory contains the typical dirs like /bin /lib /etc and so on and those dirs get symlinked together to create your user profile or system profile.
@@formbi Yeah, but then how can I, the developer, provide a Nix package by myself?
I really like NixOS! While I have successfully installed it on a computer, my favorite use-case is *still* being able to use it like a generalized Python's VirtualEnv/Pip or NodeJS NPM system for maintaining the versions of libraries you're using for a particular project -- only, with NixOS, you can customize *everything* !
I also love that this feature of NixOS -- that it can be used as a package number on pretty much *any* Unix-ish system -- can be used as a way to get comfortable with the NixOS system in general, while *still* using your favorite "easy" Linux Distro, which can be a stepping stone for installing it on a computer.
If you count non-unique packages (so packages at least one other repo has, helps filter out some cruft pretty much no-one uses) nixpkgs has more than the AUR 🚀
Great overview. I've been trying it for two days now and I'm hooked
Now more "BTW I use NIX" ❤
Great exposition and amazing summary of the features! The reproducibility and the reversibility of the installation are KILLER FEATURES for developers and workstation users ! And image what issues solved for embedded systems !
You got me in the first 2.5min.
But if I switch to NixOS, I can't say "I use Arch, btw" anymore :(
I use NixOS FYI
I use NixOS fyi
Alright, y'all convinced me. I'll switch to Nix when I inevitably break Arch catastrophically.
@@lapin_noir Okay see you in 4 minutes
Great video. I've been all-in on Linux about four years now, and I've had a lot of fun distro hopping and tweaking my systems. But after all this time, maybe I'm getting burned out on the endless tweaking and adjusting. Having lost count of all of the deb-based, arch-based, fedora, gentoo, SUSE and all the rest flavors, including the source distros, I've gotten very friendly with the command line. But now I actually need to get productive work done, and my work isn't in the development field lol. You can't know how much I wish I'd known about Nix when I started out so that the setup duplication across my five laptops would have been so much easier!
When I finally have time for basic raw experimentation again I'm going to learn this inside and out. Right now though I'll have to stay with what I've already established. I enjoyed the video!
Omg mom! I'm on TV! (very, very indirectly)
I met three Nix OS users in 2013. They were also contributing code. They have come so far.
I use NixOs btw.
Of course!
😆
Oi! Get your own catchphrase.
I might look at NixOs btw. ;)
AWESOME! Nix config file with stability features should be a must and mandatory in every Linux distro. Heck, it should be already in Windows!
So... can we say that this is Nick's OS from now on? xD
Hahaha not yet, but probably soon!
Good one! 😂😂👍
Also the fact that if you use flakes to build system or environment along with it actually "kinda" (emphasis on kinda) forces you to ensure that your changes are added to git.
NixOS sounds so cool but my only 128GB drive says otherwise 😭
It doesn’t use that much space if you clean up regularly :)
@@TheLinuxEXP Nah I meant with it installing new dependencies for every package would use up lots of space and I need many programs
@@aqua-bery It shares dependencies between programs tho. It takes a bit more space than normal distro but still far from windows space usage
I literally had a smooth experience on a 32 gb laptop. but thats probaly since i do most stuff web based
@@aqua-beryit’s not an issue, just use a filesystem with compression and deduplication built in like btrfs and keep to like 5 generations which is plenty.
Very great timing on this one, I just installed nix yesterday. Great job nick!
I absolutely love NixOS, I found it by accident when I was trying to install a package on openSUSE that was not available on official repo, neither on packman nor on homebrew. Sadly I had to go back to Arch Linux eventually, Nix does have way more packages than AUR, but it doesn't have all the packages that AUR has. The thing is, I can use Nix on any Linux distro, even Arch, but I can't use AUR on NixOS, so what I ended up doing was to install Arch Linux and Nix (the package manager), that way I will always have everything I need. Still I miss NixOS as a distribution and I thinking about going back to it (If openSUSE don't convince me of sticking with it bc Arch Linux is giving me some problems lately and openSUSE is already there for any emergency).
On the matter of using the unstable channel: you don't have to fear anything, the system is as rock solid as it would be in stable, the problem is that sometimes you will not be able to upgrade your system. When something breaks on unstable in a package that you're using, you will not be able to reproduce the package locally either, which means that the worse that can happen is to end up with an outdated system for a while, or not be able to install the packages that are broken (packages that depend upon it may be fine if nix didn't updated the dependencies as well).
In cases that unstable is broken, you can still install packages from stable channel, this is what I did back then when some packages were broken and wouldn't install, just use the packages directly from stable channel, that's the advantage of NixOS' isolation.
Another big advantage of NixOS is reproducibility, which was one of the biggest concerns that inspired Flatpak and Snap (and AppImage somehow), in the terms that if a package works on my machine, it is guaranteed to work on yours as well.
The interesting part of NixOS for me is:
Instead of distributing packages in binary form, they distribute a Declaration of the package (Expression), which is basically instructions of how to build a package and what are its dependencies (which are also expressions with their own instructions), using a language that is also purely functional, and instead of just distributing the binaries like regular distro does, they distribute the expressions.
To solve the problem of having to compile every package you install, they've built Hydra and Cachix, Hydra builds all the packages, Cachix stores the artifacts/binaries. Additionally you can build packages with your own configuration, although it's almost guaranteed that you will need to compile them because Cachix does not have all variations of configurations available, it just has the default one if I'm not mistaken.
The other advantage is that they can also provide non-free packages, even the ones that do not allow binary distribution, they just give you the instructions (Nix Expression), and let you build the package locally, which is completely legal, way better than just not having the package at all (like some distro were forced to do to avoid being sued).
Nix OS is Nick's OS. Ahhhhh
Hahah I restrained myself from making that joke, maybe I shouldn’t have 😂
@@TheLinuxEXP
@@TheLinuxEXP You totally should have owned that joke. I am disappointed in you lol
Hmm very interesting. I will defo checkout the distro! Thanks!
Recently the nixOS team has been facing severe problems with server hosting costs due to their sponsor being bought up. Look it up, it'd a big problem. If you could help them sort things out you should definitely help out
They are not "severe problems". I don't know who started this false meme. The existing sponsor is coming to the end of the sponsorship, so they are looking at other options. The distro is not in any way at risk.
Very interesting concept, feels like a dockerfile approach but to a whole OS!
I say cool beans 😢
Hahaha well I do too 😂
This is the brass ring for sys admins
I know nothing about Linux admin but I can see this combined with vanilla os concepts, bare metal hardware, and bulletproof backups eliminating a lot of headaches
Nix kind of isn't really a package manager. It's more like a build system, and NixOS is "just" a single absurdly configurable package. You can technically build NixOS on any system with Nix installed, but naturally it's hard to actually install fully without overwriting the existing system.
Using NixOS honestly gives me a similar feeling as Rust in a key way: both provide heavy restrictions on how one can do something, but those restrictions also allow me the freedom to do things that I probably wouldn't dare attempt with other systems. Specific to NixOS, if i ever feel like tweaking my system, I can do that in a simple and reversible manner. If it doesn't work out, info the changes and move on; if it does, then i can trust it to work until that itch returns.
Btrfs under Ubuntu was good for that before I switched to NixOS
Wow my eyes just lit up. Like a docker config file but better. Thanks for sharing! Haven't distro hopped in a while. ❤