NIX OS: the BEST package manager on the MOST SOLID Linux distribution

HomeOther ContentNIX OS: the BEST package manager on the MOST SOLID Linux distribution
NIX OS: the BEST package manager on the MOST SOLID Linux distribution
NIX OS: the BEST package manager on the MOST SOLID Linux distribution
Try Kasm Workspaces to stream desktops, operating systems and apps to your browser: https://www.kasmweb.com/community-edition

Or you can use KasmVNC, the best open source remote desktop solution on Linux: https://github.com/kasmtech/KasmVNC

Get a brand new laptop or desktop running Linux: https://www.tuxedocomputers.com/en#

SUPPORT THE CHANNEL:
Access a weekly podcast, vote on the next topics I cover and get your name in the credits:

YouTube: https://www.youtube.com/@thelinuxexp/join
Patreon: https://www.patreon.com/thelinuxexperiment
Liberapay: https://liberapay.com/TheLinuxExperiment/

Or you can donate what you want: https://paypal.me/thelinuxexp

GET TLE PRODUCTS
Support the channel AND get cool new hardware: https://the-linux-experiment.creator-spring.com/

️ LINUX AND OPEN SOURCE NEWS PODCAST:
Hear the latest Linux and open source news, with deeper, ad-free coverage! https://podcast.thelinuxexp.com

FOLLOW ME ELSEWHERE:
Website: https://thelinuxexp.com
Mastodon: https://mastodon.social/web/@thelinuxEXP
Pixelfed: https://pixelfed.social/TLENick
PeerTube: https://tilvids.com/c/thelinuxexperiment_channel/videos
Discord: https://discord.gg/XMuQrcYd

#nixos #linux #linuxdistro

00:00 Introduction
00:36 Sponsor: Kasm, the best remote desktop tool
01:22 What is NixOS?
04:20 Using the configuration file
08:58 Nix Package Manager
11:03 Update and unstable channel
12:48 Nix is much more than that
2:53 p.m. Sponsor: Get a PC designed to run Linux
3:58 p.m. Support the channel

NixOS is a completely and completely reproducible Linux distribution. Everything you use is defined in a configuration file used to build your system. All services, packages, options, partition layout, hardware, everything is in this configuration file.

If you're a developer, your eyes might glaze over right now: That's right, a single configuration file to exactly replicate your entire development environment.

You can also never enter the hell of addiction. The packages all declare exactly which versions of each library they need, and those versions are all installed side by side and retained, not erased by newer versions.

To create your configuration, there is a main configuration file in /etc/nixos called configuration.nix.

This file uses its own specific, fully functional syntax: it describes everything the system uses and with what options, from hardware, bootloader, services, packages, applications, users, everything.

This file is then used to build your operating system. Nix will read everything in it and install, configure, and enable or disable everything, depending on what's in the file. So if you create a nixOS system with the same config file as someone else, you will end up with the exact same system.

Once you have rebuilt your system, there are now several entries in the bootloader: one for the new version and one for the old one: you can always revert to the previous configuration.

Of course, all of this requires root access to modify the main system configuration. But if you don't have root access, or don't want to add programs to your main reproducible setup, but just test them for now, you can also install packages as a regular user, at nix package manager help. Or you can add flatpak to your config file or run appimages. But the installation of programs will mainly be done using the Nix package manager.

The Nix package manager works on any Linux distribution, but also on macOS, WSL, etc. It's very easy to use. If I want to install, for example, OBS, I simply type

nix-env -iA nixos.obs-studio

The -i is the argument to install, and the capital A is used to tell the package manager to install using the specific name of the package, instead of scanning the entire repository, which is much slower.

If I want to remove the package, I can use nix-env -e obs-studio, and it will be removed. Note that installing packages with nix-env does not add them to the configuration file.

NixOS works with channels. By default, you will use the Stable channel, with tested packages that only receive security updates and major feature updates when a new version of NixOS is released, every 6 months.

To update you can simply run the command

sudo nix-channel –update

This will pull all the latest versions of the channel package used by your system.

Then you run the command /"nix-rebuild switch –upgrade/", and your system will grab each new version of each package and rebuild the system based on your configuration file.

It is important to note that the new version of a package is installed alongside the old one. New versions are the ones that will be used, thanks to a simple symbolic link system that always points to the most recent version of a package, but you can revert to an older one.

To obtain more recent packages, at the risk of having a less stable system, you can switch to the unstable channel.

Please take the opportunity to connect and share this video with your friends and family if you find it useful.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *