JUST USE NIXOS!!!! Need I say more?
This article is NOT here to criticize other Linux OS's. My journey has seen me from Ubuntu, to Debian, then Gentoo (for 30 seconds) and Arch, to glorious openSUSE & finally NixOS. I will simply recount a few paths I took through linux, and why it led me to NixOS. (And why it you might end up using NixOS too!)
Context:
1. For context, I refer to something called a
configuration.nix file throughout this article. This file IS the config file for my entire system, everything is declared here. Packages, services, system settings & more.
2. Another phrase I use is *rebuild* or
sudo nixos-rebuild switch. When I refer to either one of these commands, they're essentially the NixOS equivalent of sudo apt-get install AND systemctl start/enable all bundled together in one command.
--------------------------------------------------------------------------------------------------------------------
If there's 1 paragraph you read today, have it be this one.
Everything on NixOS is declarative. Programs, services, system settings, you name it!
I DO NOT CARE HOW GOOD YOU ARE AT CONFIGURING YOUR FAVORITE MACHINE. I WANT TO SETUP HYPRLAND IN 20 MINUTES AND PLAY SOME SPACEMARINE 2 BEFORE 8 PM TONIGHT! NIXOS HELPS ME DO JUST THAT.
Don't get me wrong, I've had some wonderful vibe-configuring nights where I stayed up till 3-4 am configuring my machine away. Setting up the perfect environment for me. Podcasts were listened to, youtube was watched, and I walked away feeling accomplished & sleep deprived.
BUT, the amount of times I walked away defeated because I broke my system, is immeasurable. Going to bed knowing tomorrow I have to reinstall my system hurts my soul. I HATED that feeling!
"Well why didn't backup your system before making changes?" <- Simple answer:
I never figured out how. Reinstalling hurt so deeply because I felt my efforts in making my perfect config was wasted. I had to start over from zero again.
Now my life on NixOS goes something like this:
YO! I just saw a sick video about Hyprland. Lemme try it out!
Type in:
vim /etc/nixos/configuration.nix
Add this line to my config:
programs.hyprland.enable = true;
Rebuild my system:
sudo nixos-rebuild switch **
Type in:
Hyprland into the console.
** - Because of the Nix package manager, Hyprland will install with all its required dependencies. Including the kitty terminal! (Hyprlands default terminal)
Hyprland is sick. What about dwl?
Open up config:
programs.hyprland.enable = false;
programs.dwl.enable = true;
Then I rebuild:
sudo nixos-rebuild switch
Actually, I'm good with Hyprland. Lemme get waybar!
programs.hyprland.enable = true;
programs.waybar.enable = true;
And the process continues! Over time, my config grows and grows. Each backup of my
configuration.nix to github makes me feel like I am investing my efforts and time into the future. My time is NOT wasted.
"Okay bro" you might ask, "You have a fancy package manager to install shiz for you, but you still gotta go in and configure everything right?"
NOPE!
Let's take a look at a simple config of mine.
VIM!, featuring all sorts of cool plugins and settings I like.
{ pkgs, config, ... }:
{
programs.vim = {
enable = true;
extraConfig = ''
set number
set nowrap
colorscheme gruvbox
set background=dark
syntax on
set autoindent
set smartindent
'';
plugins = with pkgs.vimPlugins; [
gruvbox # For gruvbox theme
auto-pairs # Automatically fill in stuff
nvchad # Makes VIM feel like an IDE
ale # Code/Syntax error catcher
lightline-vim # Status Bar
lightline-ale # Status Bar addon that works with ALE
nerdtree # Directory viewer for projects
];
};
}
As you can see, the syntax is pretty easy to get used to. And don't worry, I didn't make this up. All these variables and options are available on websites and forums like
search.nixos.org/packages and
mynixos.com. So, with a little bit of time, you can make your own config or copy someone else's. Nix has a
HUGE community!
Wrapping up, let me leave you with a few words:
NIXOS HAS BEEN THE GREATEST OS I HAVE USED, LET YOUR SYSTEM WORK FOR YOU. BECAUSE OF NIXOS I SPEND MORE TIME USING & ENJOYING MY MACHINE AND LESS TIME CONFIGURING. ALL PACKAGES ARE WITHIN REACH. I DO NOT FEAR CONFIGS, I DO NOT FEAR DEPENDENCIES, THEY ARE BELOW ME. I HAVE CONQURED THEM WITH NIX.
LINUX SUPREMACY. NIXOS SUPREMACY.
Have a wonderful day, take care of yourself. Feel free to leave any questions in the
comment section below!