Complete NixOS configuration for deploying 5+ identical machines with professional workstation capabilities.
- KDE Plasma 6 - Full-featured desktop (default)
- Hyprland - Beautiful tiling Wayland compositor with Catppuccin theme
- CAD/3D: FreeCAD, LibreCAD, OpenSCAD, Blender, SweetHome3D
- 3D Printing: PrusaSlicer, Cura, OrcaSlicer
- Graphics: GIMP, Inkscape, Krita, Darktable, RawTherapee, Digikam, Scribus
- Video: DaVinci Resolve, Kdenlive, Shotcut, OBS Studio, Handbrake
- Electronics: KiCad
- Virtualization: Podman, Virt-Manager, QEMU/KVM
- Network Sharing: Samba (SMB) with full admin access
- Services: Plex Media Server, Nextcloud, Syncthing, Cockpit
- Development: VSCode, Git, complete toolchain
/etc/nixos/
├── configuration.nix # Main system configuration
├── flake.nix # Flake configuration for fleet management
├── flake.lock # Locked dependencies
├── home.nix # User configuration (Hyprland setup)
└── hardware-configuration.nix # AUTO-GENERATED per machine (DO NOT COPY)
- NixOS 25.11 installer USB
- Internet connection
- This GitHub repository:
https://github.com/paulblazevic/nixos
Boot from NixOS installer USB on your new machine.
For UEFI systems:
# Partition the disk
sudo parted /dev/sda -- mklabel gpt
sudo parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
sudo parted /dev/sda -- set 1 esp on
sudo parted /dev/sda -- mkpart primary 512MiB 100%
# Format partitions
sudo mkfs.fat -F 32 -n boot /dev/sda1
sudo mkfs.ext4 -L nixos /dev/sda2
# Mount filesystems
sudo mount /dev/disk/by-label/nixos /mnt
sudo mkdir -p /mnt/boot
sudo mount /dev/disk/by-label/boot /mnt/bootFor BIOS/Legacy systems:
sudo parted /dev/sda -- mklabel msdos
sudo parted /dev/sda -- mkpart primary 1MiB 100%
sudo mkfs.ext4 -L nixos /dev/sda1
sudo mount /dev/disk/by-label/nixos /mntsudo nixos-generate-config --root /mntThis creates /mnt/etc/nixos/hardware-configuration.nix specific to this machine's hardware.
First, set up GitHub authentication:
# Create a credential file on the installer (replace YOUR_TOKEN with your actual token)
cat > /tmp/git-credentials << 'EOF'
https://paulblazevic:YOUR_TOKEN@github.com
EOF
sudo cp /tmp/git-credentials /root/.git-credentials
sudo chmod 600 /root/.git-credentials
rm /tmp/git-credentialsNow clone the repository:
# Save the auto-generated hardware config
sudo mv /mnt/etc/nixos/hardware-configuration.nix /tmp/hardware-configuration.nix
# Remove default configs
sudo rm -rf /mnt/etc/nixos/*
# Clone the fleet configuration
cd /mnt/etc
sudo git clone https://github.com/paulblazevic/nixos.git nixos
# Restore hardware-specific config
sudo mv /tmp/hardware-configuration.nix /mnt/etc/nixos/
# Set proper permissions
sudo chown -R root:root /mnt/etc/nixos
# Configure git
cd /mnt/etc/nixos
sudo git config user.name "paulblazevic"
sudo git config user.email "paul@blazevic.com.au"
sudo git config credential.helper storeEdit the hostname for this specific machine:
sudo nano /mnt/etc/nixos/configuration.nixFind and change these lines:
# Change hostname (line ~27)
networking.hostName = "clone1"; # Change to: clone1, clone2, clone3, etc.
# Change Samba identity for network discovery (around line ~100)
services.samba.settings.global = {
"workgroup" = "WORKGROUP";
"server string" = "clone1"; # Match hostname
"netbios name" = "clone1"; # Match hostname
# ... rest of config
};Save and exit (Ctrl+X, Y, Enter)
If you're creating clone4 or higher, add it to flake.nix:
sudo nano /mnt/etc/nixos/flake.nixAdd your new machine:
outputs = { self, nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
commonModules = [ ./configuration.nix ./home.nix ];
in {
nixosConfigurations.paulsbox = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.paul = import ./home.nix;
}
];
};
nixosConfigurations.clone1 = nixpkgs.lib.nixosSystem { inherit system; modules = commonModules; };
nixosConfigurations.clone2 = nixpkgs.lib.nixosSystem { inherit system; modules = commonModules; };
nixosConfigurations.clone3 = nixpkgs.lib.nixosSystem { inherit system; modules = commonModules; };
nixosConfigurations.clone4 = nixpkgs.lib.nixosSystem { inherit system; modules = commonModules; }; # ADD THIS
nixosConfigurations.clone5 = nixpkgs.lib.nixosSystem { inherit system; modules = commonModules; }; # ADD THIS
};# Install using the flake configuration
sudo nixos-install --flake /mnt/etc/nixos#clone1 # Use your machine name
# When prompted, set the root password
# Enter new UNIX password for root: ********Installation will take 15-30 minutes depending on internet speed.
sudo rebootRemove the installer USB and boot into your new system.
Login as user: paul
Default password: nixos
# 1. Change your user password
passwd
# 2. Set Samba password for network sharing
sudo smbpasswd -a paul
# 3. Create directories for Hyprland
mkdir -p ~/Pictures/Wallpapers
mkdir -p ~/Pictures/Screenshots
# 4. (Optional) Download a wallpaper
# Place your wallpaper at: ~/Pictures/Wallpapers/wallpaper.jpgFrom another device on your network:
- Windows:
\\clone1\homeor\\clone1\root - Mac:
smb://clone1/homeorsmb://clone1/root - Linux:
smb://clone1/homeorsmb://clone1/root
- Log out of KDE Plasma
- At SDDM login screen, select Hyprland from session dropdown
- Log in
Essential Shortcuts:
SUPER + RETURN- Terminal (Kitty)SUPER + D- App launcher (Wofi)SUPER + Q- Close windowSUPER + B- Firefox browserSUPER + E- Thunar file manager
Window Management:
SUPER + H/J/K/L- Move focus (Vim keys)SUPER + 1-9- Switch workspaceSUPER + SHIFT + 1-9- Move window to workspaceSUPER + F- Toggle fullscreen
Screenshots:
SUPER + SHIFT + S- Screenshot selection
On any machine where you make changes:
cd /etc/nixos
# Make your edits to configuration.nix, home.nix, etc.
# Test locally first
sudo nixos-rebuild switch --flake .#clone1 # Use correct machine name
# If everything works, commit and push
git add .
git commit -m "Description of changes"
git push origin mainOn all other machines:
cd /etc/nixos
# Pull latest changes from GitHub
sudo git pull origin main
# Rebuild with new configuration
sudo nixos-rebuild switch --flake .#clone2 # Use correct machine name
# Reboot if kernel or major system changes
sudo rebootStore your credentials locally on each machine (never pushed to GitHub):
# Replace YOUR_TOKEN with your actual GitHub Personal Access Token
echo "https://paulblazevic:YOUR_TOKEN@github.com" | sudo tee /root/.git-credentials
sudo chmod 600 /root/.git-credentials
cd /etc/nixos
sudo git config credential.helper storeKeep your token in a secure note - you'll need it for each new machine installation.
# Restart Samba services
sudo systemctl restart smbd nmbd
# Check firewall
sudo systemctl status firewall# Switch back to KDE Plasma from TTY
sudo systemctl restart sddmcd /etc/nixos
# Check status
git status
# If conflicts, reset to remote
git fetch origin
git reset --hard origin/main- KDE Plasma 6, Hyprland, Waybar, Rofi, Dunst
- Nemo (with network support), Thunar, Dolphin (KDE)
- Firefox, Brave, Vivaldi, Tor Browser
- FreeCAD, LibreCAD, OpenSCAD, Blender, SweetHome3D, KiCad
- PrusaSlicer, Cura, OrcaSlicer
- GIMP, Inkscape, Krita, Darktable, RawTherapee, Digikam, Scribus
- DaVinci Resolve, Kdenlive, Shotcut, OBS Studio, Handbrake, VLC
- LibreOffice, VSCode, Joplin, Homebank
- Signal, Telegram
- Podman, Virt-Manager, QEMU/KVM, Distrobox
- Samba, Plex, Nextcloud, Syncthing, Cockpit
- paulsbox - Main/primary machine
- clone1 - First replica
- clone2 - Second replica
- clone3 - Third replica
- etc.
Each machine is 99% identical with only hardware-specific and hostname differences.
- OS: NixOS 25.11 (unstable)
- Desktop: KDE Plasma 6 / Hyprland
- Shell: Fish with Starship prompt
- Theme: Catppuccin Mocha
- Network: Full SMB sharing with guest and authenticated access
This is a personal fleet configuration, but feel free to fork and adapt for your own use!
Personal use configuration - adapt as needed for your own systems.
Built by Paul Blazevic for managing a fleet of identical NixOS workstations.
Inspired by:
- end_4's Hyprland dotfiles
- NixOS community configurations
Last Updated: December 2024
Repository: https://github.com/paulblazevic/nixos