Exploring Nix OS: Installation and Configuration

Aug 24, 2024

Nix OS Overview

Introduction to Nix OS

  • Nix OS is a unique Linux distribution that is declarative in nature.
  • Popularity has led to mixed feelings; some find its community overwhelming.
  • Users of Nix OS are often very enthusiastic about its capabilities.

Personal Experience

  • Currently running Nix OS stable version 23.11 with Hyperland.
  • Nix OS allows extensive customization and offers interesting features.

Getting Started with Nix OS

  • To install Nix OS, visit the Nix OS Downloads Page.
  • Options include graphical images (GNOME, KDE) and a minimal ISO (not recommended for beginners).
  • Installation allows users to select desired packages, not just pre-installed desktop environments.

Configuration Files

  • Key configuration files:
    • hardware-configuration.nix: Usually does not require much modification.
    • configuration.nix: Main file for setting up system configurations.

Home Manager

  • home.nix: A configuration file for Home Manager, allowing for declarative setups of home directories.
  • Import this file in the main configuration to manage home settings.

System Setup

  • After installing Nix OS, the initial files need to be modified to suit user requirements.
  • The user typically does not need to adjust the hardware configuration unless specific modules are required.

System Packages and Environment Variables

  • Users can declare desired packages and services in the configuration file.
  • Supports automatic garbage collection for the Nix store to manage unused packages.
  • Users can set up environment variables, SUID wrappers, and enable various services (e.g., PipeWire instead of PulseAudio).

Rebuilding the System

  • To apply changes, use the command: sudo nixos-rebuild switch.
  • This command rebuilds the system with the new configurations.

Custom Configuration Management

  • The speaker utilizes a GitHub repository to manage their configuration files easily.
  • The repository contains scripts for automated copying and rebuilding of configurations.
  • This method ensures consistency and ease when setting up a system from scratch.

Benefits of Nix OS

  • Ideal for users who enjoy tinkering and customizing their system.
  • Once set up, Nix OS can be a stable environment with easy updates and maintenance.
  • Very useful for developers and those who want to share their configurations with others.

Conclusion

  • While Nix OS is not for everyone due to its unique setup process, it offers significant benefits for those willing to learn.
  • The community is vibrant, and there's opportunity for learning and sharing experiences.
  • Future plans include exploring game development on Nix OS.