Getting Started Installation Guide - bcl1713/nixos GitHub Wiki
Installation Guide
This guide walks you through the complete process of installing and setting up this NixOS configuration.
Prerequisites
Before you begin the installation, ensure you have:
- A working NixOS installation (if you're new to NixOS, see the NixOS Manual)
- A user account with sudo privileges
- Git installed (
sudo nix-env -iA nixos.git
if not already installed) - SSH key for GitHub (needed for agenix secrets)
- Basic familiarity with the command line
Step-by-Step Installation
1. Clone the Repository
# Create a directory for your configuration
mkdir -p ~/.dotfiles
# Clone the repository
git clone https://github.com/bcl1713/nixos-config.git ~/.dotfiles
# Navigate to the repository
cd ~/.dotfiles
2. Install Home Manager
If you don't already have Home Manager installed, add it to your NixOS configuration:
# In your /etc/nixos/configuration.nix
{
imports = [ <home-manager/nixos> ];
home-manager.users.yourusername = {
# Your initial Home Manager configuration
};
}
Then run:
sudo nixos-rebuild switch
3. Configure Personal Settings
- Create or modify the personal profile:
# Edit the flake.nix to set your username and other settings
nvim flake.nix
Look for the userSettings
section and modify it to match your information:
userSettings = {
username = "yourusername"; # Change to your username
name = "Your Name"; # Change to your name
email = "[email protected]"; # Change to your email
};
- Generate an SSH key if you don't have one:
ssh-keygen -t ed25519 -C "[email protected]"
- Set up secrets (optional):
# Create personal-email.age secret
mkdir -p ~/.secrets
echo "[email protected]" > ~/.secrets/personal-email
age -r <your-public-key> ~/.secrets/personal-email > secrets/personal-email.age
4. Apply Configuration
Apply the configuration using the flake:
# Build the system configuration
sudo nixos-rebuild switch --flake ~/.dotfiles/
# Apply the home-manager configuration
home-manager switch --flake ~/.dotfiles/
5. Verify Installation
After installation, verify everything works:
- Log out and log back in to ensure all session variables are applied
- Launch Hyprland (if using a display manager, select it, or start it manually)
- Test key components like Waybar, terminal, and application launcher
Configuration Profiles
The configuration supports different profiles based on your needs:
- personal - Default configuration for personal use
To switch profiles:
- Edit the
flake.nix
file - Modify the
systemSettings
variable:
systemSettings = { profile = "personal"; };
- Update your configuration using the commands in the "Apply Configuration" section
Post-Installation Setup
First Login
On first login to your new configuration:
- Connect to WiFi: Use the
wifi-menu
utility - Configure Git: Verify git configuration is correct
- Initialize Browser: Set up Firefox if you're using it
- Set up Passwords: Configure Bitwarden if enabled
Suggested Customizations
Consider these customizations to personalize your setup:
- Theme adjustments: Edit colors in waybar and Hyprland
- Application preferences: Configure specific applications
- Keybindings: Modify key combinations in Hyprland config
Updating the Configuration
To update your configuration with the latest changes:
# Pull the latest changes
cd ~/.dotfiles
git pull
# Apply the changes
sudo nixos-rebuild switch --flake ~/.dotfiles/
home-manager switch --flake ~/.dotfiles/
For major version updates, check the CHANGELOG.md file for breaking changes.
Next Steps
- Continue to Getting-Started-Quick-Start for essential keybindings and common tasks
- Explore Customization-Module-Options to personalize your setup
- Review Core-Window-Manager for details on Hyprland configuration