Skip to main content

ZaneyOS 2.2 Documentation

9 mins· 0 · 0 · ·
Docs NixOS ZaneyOS
I am creating content about Linux & FOSS software. You’ll find me rocking NixOS with Hyprland, probably helping somebody with a question. 😎
Table of Contents

πŸ“° What’s New This Update #

  • Revert the switch from rofi to wofi. Rofi is just better.
  • Switch from Nix Colors to Stylix. It can build colorschemes from a wallpaper.
  • Simplified the notification center.
  • Improved emoji selection menu and options.
  • Adding fine-cmdline plugin for Neovim.
  • Removed theme changing scripts as the theme is generated by the image set with stylix.image in the config.nix file.
  • Starship is now setup in the config.nix file.
  • Switched from SDDM to tuigreet and greetd.
  • Added Plymouth for better looking booting.
  • Improve the fonts being installed and properly separate them from regular packages.
  • Separated Neovim configuration for readability.
  • Updated flake and added fix for popups going to wrkspc 1 in Hyprland.
  • Removed a few of the packages that aren’t necessary and smartd by default. (This made the rebuild significantly faster and the install much smaller).
  • Removed unnecessary Hyprland input in flake as home manager doesn’t use it.
  • Turned off nfs by default
  • Hyprland plugins are now disabled in the config by default.
  • Fastfetch is now replacing neofetch.
  • Btop is back baby!
  • Switching to Brave as the default to protect user privacy.
  • Replaced lsd with eza for a better looking experience.

⬇️ How To Install & Update #

πŸ“œ Script: #

This is the easiest and recommended way of starting out. The script is not meant to allow you to change every option that you can in the flake or help you install extra packages. It is simply here so you can get my configuration installed with as little chances of breakages and then fiddle to your hearts content!

The install script also functions as a method of updating ZaneyOS. The same command below can be used to backup the current flake to ~/.config/zaneyos-backups and install the current upstream one.

Simply copy this and run it:

nix-shell -p git curl
sh <(curl -L

πŸ€” How Does It Work? #

When you run the rebuild switch command with the flake argument and give it the ZaneyOS folder, it sources the flake.nix that sources the config.nix in your specific hosts folder.

Which the config.nix file is going to pull in the users.nix and home.nix to set different configuration settings. The hardware.nix is automatically generated with all the things you need and the config.nix imports it.

All of your configuration files are in the hosts/ except for hyprland.nix and waybar.nix which are large configs that probably won’t change between hosts. Those extra config files are in the config folder.

⌨️ What Are The Keybinds? #

If you aren’t sure what the keyboard shortcuts you have available you can click the key icon in the bar at the top to show a list of all the keybindings.

Having the configuration files as a .nix file allows me to use the Nix language to generate the actual desired config file. This allows me to use things like Stylix, a phenomenal tool in NixOS, to define a base16 colorscheme and let the user change the theme and have all the programs change upon rebuild. Even GTK applications change too!

πŸ“° What Is NixOS & Why Choose It? #

NixOS is a Linux distribution known for its unique approach to package management and system configuration. It uses the Nix package manager, which is based on a purely functional approach to managing software and system configurations.

In NixOS, the entire operating system configuration is described declaratively in a configuration file, allowing for reproducibility and easy rollbacks. This means that changes to the system can be tracked and reversed, making it robust and reliable for system administrators and developers.

From Keir Williams: β€œAt the core of NixOS is a configuration file, written in the Nix language. This Nix expression is used to specify packages, users, groups, services, networking, and a whole set of other things typically configured on a Linux system.

Due to the nature of the Nix language, the system is configured completely declaratively. You specify what you want to achieve on your system, instead of specifying the step-by-step commands required to accomplish it. Using NixOS’s built-in configuration options, you can specify how you want the system to look in a manner that is logical to you. How things are built is calculated by Nix itself.”

Inside of NixOS those of you who are used to Linux distributions such as Arch where there is an extra repository with almost any package you may need, will be surprised. Nixpkgs has over 80,000 packages in its repositories with many of the packages you might otherwise need something like the AUR for.

Choosing NixOS often depends on specific needs and preferences. Here are some reasons why people opt for NixOS:

πŸ—’οΈ Declarative Configuration #

NixOS employs a declarative approach to system configuration. This means the entire system configuration is defined in a single file or files, making it reproducible and easier to manage. Changes are tracked and can be rolled back if needed.

πŸ“¦ Functional Package Management #

The Nix package manager ensures that each package and its dependencies are isolated and managed separately. This prevents conflicts between different versions of software and enables easy rollbacks to previous versions.

πŸ—οΈ Reproducibility #

NixOS allows for consistent and reproducible environments, critical in development, testing, and deployment scenarios. It’s particularly valuable in DevOps and CI/CD pipelines where consistent environments are essential.

πŸ‘― Multiple Environments and Rollbacks #

With NixOS, it’s possible to have multiple versions of the same software installed simultaneously without conflicts. This flexibility is especially useful for developers or those requiring different versions of software for various projects.

πŸ«‚ Community and Customization #

NixOS has an active community that contributes to its growth, sharing configurations, and offering support. Its customizable nature allows users to tailor their systems to their needs.

🏠 What Is Home Manager? #

I think I did a good job of explaining that here on my YouTube channel:

πŸ“” How To Use ZaneyOS #

I have some very useful aliases that are available to you after switching to the flake.

🐊 Update The Flakes Inputs & Packages #

  • fu

This runs a nix flake update on the flake directory. You probably shouldn’t run this. This updates all packages and the lock file in the ZaneyOS flake. Only do this if you need to and know you need to, running this command opens you up to breaking changes.

  • fr

Runs a rebuild switch --flake on the flake directory. Used for updating the system after you have made changes to some of the files. This assumes you keep the zaneyos folder/repo in your home dir.

  • ncg

This removes all other generations other than the current. Great for cleaning up the system if you have been rebuilding and making changes a lot recently.

  • zu

This will pull down the latest stable install script from the zaneyos repo and run it. The install script also functions as an update script where it backups your current config to .config/zaneyos-backups and then installs the new version.

For most system maintenance this is all that is required.

The cat command has been aliased to bat which makes life awesome when you want to quickly check a file. I have also added a few interesting terminal easter eggs that are pretty neat.

πŸ“¦ Adding & Installing Extra Packages #

You can find the place to put packages to be installed for your user specifically at hosts/insert-hostname/users.nix and for the system packages it’s the hosts/insert-hostname/config.nix file.

You MUST use the proper NixOS package names.

Visit the NixOS Packages page to search for the application you want. It is a good idea to check the NixOS Options at the top of that page as well for the package your searching for.

If the package you are installing needs extra configuration there is a decent chance there is a way of installing it, (enable = true;), through NixOS options or Home Manager.

🀯 Variables & Theming #

In your host specific folder you will find the variables.nix file. This is where you can set variables that are used other places in the configuration.

option description
gitUsername Set username for Git, similar to *git config –global “insert-username-here”.
gitEmail The email you use for your Git account.
extraMonitorSettings Add “monitor=” hyprland lines to hyprland config for host specific monitor settings.
clock24h Enable the time for different utilities to be presented in 24 hour format.
browser The name of the browser do you want installed and used by default. The package name too, for ones like google-chrome where the binary is google-chrome-stable this is solved for you. So it would just be google-chrome.
terminal Name of the binary for your terminal of choice. Example: “kitty” or “alacritty”.

πŸ“ File Structure Explained #

The way the files are structured is quite simple. The repository top level has the Gitlab specific files as well as the flake.nix and flake.lock files that are responsible for managing the flake. Then we have the modules folder which contains modules that allow me to give you simple drivers.amd.enable = true; option that sets many other config settings, this helps keep the config.nix from looking like an absolute beast.

The hosts folder has separate hosts configurations with the folder containing the files named by the hostname of that system. These could be put in home.nix and are being imported by it. However, these being in that file would make it significantly larger.

Below you’ll see the file structure:

β”œβ”€β”€ config
β”‚   β”œβ”€β”€ emoji
β”‚   β”œβ”€β”€ hyprland.nix
β”‚   β”œβ”€β”€ waybar.nix
β”‚   β”œβ”€β”€ base16-themes
β”‚   β”œβ”€β”€ starship.toml
β”‚   └── ...
β”œβ”€β”€ modules
β”‚   β”œβ”€β”€ amd-drivers.nix
β”‚   β”œβ”€β”€ intel-drivers.nix
β”‚   β”œβ”€β”€ local-hardware-clock.nix
β”‚   β”œβ”€β”€ vm-guest-services.nix
β”‚   └── ...
β”œβ”€β”€ scripts
β”‚   β”œβ”€β”€ emopicker9000.nix
β”‚   β”œβ”€β”€ wallsetter.nix
β”‚   └── ...
β”œβ”€β”€ flake.nix
β”œβ”€β”€ flake.lock
β”œβ”€β”€ hosts
β”‚   └── default
β”‚       β”œβ”€β”€ config.nix
β”‚       β”œβ”€β”€ hardware.nix
β”‚       β”œβ”€β”€ home.nix
β”‚       β”œβ”€β”€ users.nix
β”‚       └── variables.nix
└── ...

🀨 Great Things To Know #

πŸ™‰ Virtualization #

The smartd service will need to be disabled inside of a virtual machine.

Please remember to enable the vm-guest-services when running inside a virtual machine.

This will ensure you have the best experience possible.

πŸ—„οΈ NFS Causes Auto Rebuild To Fail #

Until I am able to edit the script to include a fix for this the script will fail if you have NFS enabled and are updating from an earlier version. This is due to your hardware having a mounted NFS share and NFS being disabled in the default config.

🦊 Firefox Is No Longer The Default Browser #

We are switching to Brave as Firefox is very bad for protecting ones privacy and its parent company is not making good decisions.

🌏 Google Chrome #

The package name and binary name for Chrome is different. This could be true of other browsers or terminals. So make sure to pay attention to the NixOS Package Search as it will tell you both. Put the package name in the config.nix and the binary name in the variables.nix file.

Thank you for taking the time to read the documentation and for all of those of you who have contributed to making this and the project better I cannot thank you enough.


ZaneyOS 2.1 Documentation
8 mins· 0 · 0
Docs NixOS ZaneyOS
ZaneyOS 2.0 Documentation
7 mins· 0 · 0
Docs NixOS ZaneyOS
What Is NixOS
3 mins· 0 · 0
Docs NixOS ZaneyOS
How To Install ZaneyOS
2 mins· 0 · 0
Docs NixOS ZaneyOS
How To Use ZaneyOS
2 mins· 0 · 0
Docs NixOS ZaneyOS
My NixOS Configuration: ZaneyOS Explained
5 mins· 0 · 0
Docs NixOS ZaneyOS