/systems/<hostname> directory. Each system requires a declaration in /systems/default.nix using the easy-hosts flake module.
System configuration structure
Each system follows this structure:Creating a new system
Add the system configuration
Create
systems/yoursystem/default.nix with your system settings:systems/yoursystem/default.nix
Available profiles
Available profiles
workstation.enable- Development tools and utilitiesgraphical.enable- GUI applications and desktop environmentserver.enable- Server-optimized settingsheadless.enable- No graphical interface
Configure hardware
Create
systems/yoursystem/hardware.nix for hardware-specific configuration:systems/yoursystem/hardware.nix
Configuration options
When declaring a system insystems/default.nix, you can set these options:
arch
- Default:
"x86_64" - Options:
"x86_64","aarch64"
class
- Default:
"nixos" - Options:
"nixos","darwin","iso","wsl"
System classes
System classes
- nixos - Standard NixOS installation
- darwin - macOS with nix-darwin
- iso - Live installation media
- wsl - Windows Subsystem for Linux
modules
- Default:
[]
specialArgs
- Default:
{}
Example configurations
Building and deploying
After configuring your system, you can build and deploy it:- NixOS
- macOS
- ISO
Next steps
Add users
Configure user accounts for your system
Add packages
Install and configure packages
Secrets management
Set up encrypted secrets with sops-nix
Troubleshooting
Fix common issues