-
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 machines/{hostname}/default.nix file for per-machine configuration, combining with machines/profiles/base.nix.
Create a new directory for your machine:
mkdir machines/yourhostnameCreate machines/yourhostname/default.nix and customize:
{
username = "youruser";
hostname = "yourhostname";
system = "x86_64-linux";
# Select desktop environment: "hyprland", "kde", or null
desktopEnvironment = "hyprland";
# Set any feature overrides from base.nix
enableSteam = true;
useNvidiaPrime = false;
# You can also set arbitrary NixOS config here directly
boot.devSize = "8G";
}See Variables Reference for detailed explanations of all options.
Generate hardware configuration for your machine:
nixos-generate-config --show-hardware-config > modules/system/hardware_yourhostname.nixYou need to encrypt your secrets (like githubToken and passwords) using sops-nix.
- If you don't have an age key, generate one:
nix-shell -p age --run "age-keygen -o ~/.config/sops/age/keys.txt" - Update
.sops.yamlin the root of the repo to include your public key. - Create the encrypted secrets file:
nix-shell -p sops --run "sops machines/yourhostname/secrets.yaml" - Add the required secrets like
githubToken. See Managing Secrets.
Edit flake.nix to add your machine configuration.
Find the nixosConfigurations block and add your machine:
nixosConfigurations = {
nslapt = mkSystem "nslapt" "pc";
nspc = mkSystem "nspc" "pc";
nsminipc = mkSystem "nsminipc" "server";
# Add your new machine here (select "pc" or "server" profile)
yourhostname = mkSystem "yourhostname" "pc";
};To build and switch to your new configuration, first enter the dev environment:
nix developThen you can run the alias:
fr # Rebuild current machine
# OR
nh os switch --hostname yourhostname- Takes time: First build downloads and builds many packages
- Large download: Expect several GB of downloads
- Check logs: Watch for errors during build
After successful build:
- Reboot your system:
sudo reboot - You should see SDDM login manager
- Login with your user account
- Hyprland (or KDE) should start automatically
After logging in, proceed to First Steps to:
- Set your password
- Learn keybindings
- Customize your environment
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
- First Steps - Initial configuration
- Customization Guide - Make it yours
- Hyprland - Learn the window manager