NYX a purely functional package manager and system configuration tool that allows developers to say it works on my machine with absolute confidence it was created in 2003 by eel cdra who wrote his PhD thesis on a purely functional software deployment model 20 years later it's used by tons of software projects like Mozilla Firefox Google's idx and of course NYX OS a complete Linux distro based on this package manager but why NYX when you set up your own Linux server the default approach is to sh into it and start running a bunch of commands that you copied from random places on the internet the problem is that it quickly becomes impossible to reproduce the state of your machine and if you mess something up there's no undo button NYX users don't have these problems because it provides its own declarative language to Define packages network settings the file system environment variables users and everything else you need in a NX file this file is like a blueprint that can now reproduce the same machine over and over again now any changes to this config are transactional or atomic meaning everything succeeds or fails together a huge advantage of that is when you screw something up you can easily roll back to the previous state it's like having a time machine for your machine this is possible because in the nyck store each package and its dependencies are stored in a separate directory identified by a unique cryptographic hash which guarantees that packages won't interfere with each other and with Nick shell you can create unique environments for all of your projects that means side by-side installation for all of your tools in their different versions without the need for version managers like NVM virtual EnV or rust up because it's all declarative and deterministic you can organize your configs as Flakes and then trade them with your friends like their Pokémon cards to get started install the Nyx package manager or better yet live boot NYX OS to try it out as a full Linux drro inside the ETC directory you'll find a configuration.nix file you can think of this file as a function that returns a dictionary or hashmap at the top we have parameters for config which gives us access to the entire configuration and packages which includes all theack packages available on NYX OS next with Imports we can break up our config into multiple smaller files to keep things organized but the real magic of Nyx is being able to configure the entire system right here like set the bootloader to Grub 2 or set the time zone to Arizona or add a user like Alice who has pseudo privileges not only is that way more efficient than the user ad command in Linux but it's explicit declarative and reproducible now if I want to add a new package like Metasploit I can add it here and then run nixos rebuild switch this will download the package and all of its dependencies and rebuild the system pretty cool but what's really awesome is that if we made a mistake we can list out all of the generations and then easily roll back to a previous version this has been Nyx in 100 seconds amazing tools like this exist because good developers understand how to solve problems and you can start developing your problem solving skills for free today thanks to this video sponsor brilliant it doesn't matter which Linux drro you use but rather how well you use it to solve problems Brilliance platform will introduce you to essential programming con Concepts but most importantly the Hands-On exercises will develop your brain to recognize and solve complex problems that developers need to overcome on a daily basis best of all every lesson is concise and rewarding by investing just a few minutes each day you'll develop habits that can level up your programming skills for the rest of your life and you can do it anywhere even from your phone to try everything brilliant has to offer for free for 30 days visit brilliant.org sfip or scan this QR code for 20% off their premium annual subscription thanks for watching and I will see you in the next one