Skip to content

Latest commit

 

History

201 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


ZyNixOS





Table of Contents

Installation

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.

Installation Steps

  1. Clone the Repository:
git clone https://github.com/alper-han/ZyNixOS.git ~/ZyNixOS
  1. Change Directory:
cd ~/ZyNixOS
  1. Run the Installer:
./install.sh

On 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.

Usage

Managing Hosts

Method 1: Automatic - run the installer again to select or create another host:

./install.sh

Method 2: Manual:

  1. Copy hosts/Default to a new directory (e.g., hosts/Laptop).

  2. Set hostname = "Laptop"; in the new host's variables.nix, then select its hardware, boot mode and packages. Do not copy hosts/Desktop/hardware-configuration.nix.

  3. Generate hosts/Laptop/hardware-configuration.nix on the target machine (or run the installer and select the new host). Review the generated mounts and UUIDs.

  4. Stage the host directory so the Git-backed flake includes the new hardware file:

    git add hosts/Laptop
  5. The flake discovers hosts with a staged/tracked hardware configuration automatically; no flake.nix edit is needed. Rebuild with that hostname via nixos-rebuild or nh (see Rebuilding below).

Rebuilding

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).

Rollbacks

List generations:

list-gens

Rollback to generation N:

rollback N

Replace N with the generation number (e.g., 69).

Keybindings

View all keybindings with Super + ? or Super + Ctrl + K.

Credits/Inspiration

Credit Reason
Sly-Harvey/NixOS Provided the NixOS template base

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages