-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Complete guide to installing NullOS on your system.
Before installing NullOS, ensure you have:
- ✅ A working NixOS installation
- ✅ Git installed (
nix-shell -p git) - ✅ Nix flakes enabled
- ✅ Basic familiarity with NixOS concepts
If you haven't already enabled flakes, add this to /etc/nixos/configuration.nix:
nix.settings.experimental-features = [ "nix-command" "flakes" ];Then rebuild:
sudo nixos-rebuild switchClone NullOS to your home directory or preferred location:
git clone https://github.com/yourusername/NullOS.git ~/NullOS
cd ~/NullOSNullOS uses a variables.nix file for per-machine configuration.
cp variables.nix.example variables.nixOpen variables.nix and customize:
{ nixpkgs, ... }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
{
# User Configuration
username = "youruser";
hostname = "yourhostname";
gitUsername = "Your Name";
gitEmail = "your@email.com";
# System
system = "x86_64-linux";
timeZone = "Europe/London";
locale = "en_GB.UTF-8";
keyboardLayout = "gb";
consoleKeyMap = "uk";
# Applications
terminal = "ghostty";
browser = pkgs.brave; # or pkgs.firefox, pkgs.chromium
# NVIDIA (for hybrid graphics laptops)
useNvidiaPrime = false; # Set to true if you have NVIDIA + Intel
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:2:0:0";
# Theming
stylixImage = wallpapers/screen.jpg;
waybarConfig = home/waybar/default.nix;
animationSet = home/hyprland/animations-end4.nix;
# Backup (optional)
resticRepository = "sftp:user@host:/backup/path";
# Monitor Configuration
extraMonitorSettings = "
monitor = eDP-1, 1920x1080@60,auto,1
";
# Printing
printEnable = true;
printDrivers = [ ];
# Hardware
add_rtl8852cu = false;
}See Variables Reference for detailed explanations of all options.
Generate hardware configuration for your machine:
sudo nixos-generate-config --show-hardware-config > /tmp/hardware.nixCreate a hardware configuration file for your machine:
cp modules/system/hardware_nslapt.nix modules/system/hardware_yourhostname.nixEdit the new file and replace the hardware configuration with content from /tmp/hardware.nix.
Key sections to copy:
-
imports(nixos-hardware modules if any) -
boot.initrdconfiguration -
fileSystemsentries swapDevices- Machine-specific
hardwaresettings
Edit flake.nix to add your machine configuration. NullOS uses a mkSystem helper to simplify this.
Find the nixosConfigurations block and add your machine:
nixosConfigurations = {
nslapt = mkSystem {
hostname = "nslapt";
hardware = ./modules/system/hardware_nslapt.nix;
# ... existing config
};
nspc = mkSystem {
hostname = "nspc";
hardware = ./modules/system/hardware_nspc.nix;
};
# Add your new machine here
yourhostname = mkSystem {
hostname = "yourhostname";
hardware = ./modules/system/hardware_yourhostname.nix;
};
};If you need extra modules or special configurations (like the nslapt specialisation), you can pass extraModules:
yourhostname = mkSystem {
hostname = "yourhostname";
hardware = ./modules/system/hardware_yourhostname.nix;
extraModules = [
# Your extra modules here
];
};Now build and switch to your new configuration:
sudo nixos-rebuild switch --flake .#yourhostnameIf you have git-ignored files (like variables.nix), use:
sudo nixos-rebuild switch --flake .#yourhostname --impure- Takes time: First build downloads and builds many packages
- Large download: Expect several GB of downloads
- Check logs: Watch for errors during build
- Don't panic: If it fails, read the error message carefully
After successful build:
- Reboot your system:
sudo reboot - You should see SDDM login manager
- Login with your user account
- Hyprland should start automatically
After logging in, proceed to First Steps to:
- Set your password
- Configure wallpapers
- Learn keybindings
- Customize your environment
Make sure all files are tracked in git or use --impure flag:
git add -A
# or
sudo nixos-rebuild switch --flake .#yourhostname --impureCheck your hostname matches what you defined in flake.nix:
hostname # Should match the name in flake.nixEnsure you're using sudo for nixos-rebuild:
sudo nixos-rebuild switch --flake .#yourhostnameIf you have NVIDIA hardware, see NVIDIA configuration guide.
If hardware isn't detected properly:
- Check your hardware config has all necessary modules
- Review
boot.initrd.availableKernelModules - Ensure filesystem UUIDs are correct
If you have an existing NixOS installation:
- Backup your current
/etc/nixos/configuration.nix - Follow steps above
- Can mix old config with NullOS by importing your old config as a module
For a fresh NixOS installation:
- Install NixOS using official installer
- Clone NullOS during first boot
- Follow this guide
- First Steps - Initial configuration
- Customization Guide - Make it yours
- Hyprland - Learn the window manager
Need help? Check Troubleshooting or open an issue on GitHub.