Note
hosts/Default is the starter template; its variables.nix matches the Desktop defaults,
except hostname = "Default". Review the username and other machine-specific values.
It intentionally has no hardware config: installers generate one for each target host.
Do not add a generic hardware file or copy the generated file from another machine.
hosts/Desktop is the personal workstation profile; do not reuse its packages or hardware.
Review the selected host's variables.nix, host-packages.nix and configuration.nix.
You can install on a running system or from the NixOS live installer. Get the minimal ISO from the NixOS website.
- Clone the Repository:
git clone https://github.com/alper-han/ZyNixOS.git ~/ZyNixOS- Change Directory:
cd ~/ZyNixOS- Run the Installer:
./install.shOn an installed NixOS system, ./install.sh defaults to the matching configured
hostname; otherwise select another configured host or create one from Default.
Existing hardware files are preserved unless you explicitly regenerate them. On a
NixOS live ISO, it delegates to live-install.sh: review every selected disk,
partition, filesystem, encryption and boot choice before typing the exact device
confirmation. Automatic swap defaults to half of RAM (at least 2 GiB, no cap), or
at least RAM plus 10% when hibernation is requested; either size can be adjusted
within available disk space. UEFI installs require Secure Boot disabled.
Method 1: Automatic - run the installer again to select or create another host:
./install.shMethod 2: Manual:
-
Copy
hosts/Defaultto a new directory (e.g.,hosts/Laptop). -
Set
hostname = "Laptop";in the new host'svariables.nix, then select its hardware, boot mode and packages. Do not copyhosts/Desktop/hardware-configuration.nix. -
Generate
hosts/Laptop/hardware-configuration.nixon the target machine (or run the installer and select the new host). Review the generated mounts and UUIDs. -
Stage the host directory so the Git-backed flake includes the new hardware file:
git add hosts/Laptop
-
The flake discovers hosts with a staged/tracked hardware configuration automatically; no
flake.nixedit is needed. Rebuild with that hostname vianixos-rebuildornh(see Rebuilding below).
Apply configuration changes:
- Keyboard shortcut:
Super + U - rebuild script:
rebuild - nixos-rebuild:
sudo nixos-rebuild switch --flake ~/ZyNixOS#<HOST> - nh:
nh os switch --hostname <HOST>
Replace <HOST> with the name of your host (e.g., Laptop).
List generations:
list-gensRollback to generation N:
rollback NReplace N with the generation number (e.g., 69).
View all keybindings with Super + ? or Super + Ctrl + K.
| Credit | Reason |
|---|---|
| Sly-Harvey/NixOS | Provided the NixOS template base |




