Skip to content
Orbit-NixPublic

About

OrbitOS goes brrrr -- Beginner-friendly feature-full multi-host multi-purpose NixOS configs

Resources

Stars

8 stars

Watchers

1 watching

Forks

Latest commit

 

History

57 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

❄️ OrbitOS Starter Template

Declarative, multi-host, modular NixOS flake template featuring Hyprland desktop environments, Quickshell rice, Home Manager integration, remote streaming, modular hardware profiles, and declarative server stacks.


📁 Template Structure

.
├── config/                 # Modular application configs & dotfiles
│   ├── cursor/             # Dynamic wallpaper-matching cursor generator
│   ├── fish/               # Fish shell configuration & environment
│   ├── gtk-3.0/            # GTK 3 custom stylesheets
│   ├── gtk-4.0/            # GTK 4 custom stylesheets
│   ├── hypr/               # Hyprland lua configs & window rules
│   ├── kitty/              # Kitty terminal configuration
│   └── nixpkgs/            # Nixpkgs settings (e.g. allowUnfree)
├── flake.nix               # Flake inputs, outputs, and host configurations
├── hosts/                  # Machine definitions (archetypes)
│   ├── desktop/            # Workstation / Gaming PC (Sunshine streaming host)
│   ├── laptop/             # Portable laptop (Moonlight client kiosk)
│   └── server/             # Headless / Storage server (Disko Btrfs & Docker)
├── modules/                # Reusable system & hardware configuration modules
│   ├── app-configs/        # Per-app integration hooks (fish, gtk, hypr, kitty)
│   ├── app-configs.nix     # Modular app layering & overwrite engine
│   ├── apps.nix            # System-wide GUI apps, browsers, and dev tools
│   ├── assets/             # Wallpapers and media
│   ├── core.nix            # Base system, OpenSSH, nh, and networking
│   ├── desktop.nix         # Hyprland, audio (PipeWire), display managers
│   ├── docker.nix          # Docker daemon and Dockhand dashboard
│   ├── gaming.nix          # Steam, GameMode, Prism Launcher, controller drivers
│   ├── hardware/           # Modular CPU & GPU hardware profiles
│   ├── rebuild.nix         # OrbitOS rebuild CLI & SSH key tools
│   ├── remote-desktop/     # Sunshine streaming host & Moonlight client
│   └── server/             # Server stacks, Btrfs filesystem, and storage
├── secrets/                # Encrypted secrets (age-encrypted ~/.ssh archive)
│   └── .gitkeep
└── users/                  # Modular user accounts & user environments
    ├── user/               # Primary user template (System user & Home Manager)
    │   ├── default.nix     # System user account, groups, password & SSH keys
    │   └── home.nix        # Desktop Home Manager dotfiles, themes & services
    └── dev/                # Example secondary/restricted developer user
        └── default.nix     # Non-sudo developer account with SSH key access

🖥️ Machine Archetypes

Host Recommended Role Included Highlights
desktop Workstation & Gaming PC Hyprland, Steam/GameMode, Sunshine streaming host, Full GUI apps
laptop Portable Computer Hyprland, Moonlight client, Battery/Hybrid GPU profile options
server Headless Server / NAS Disko declarative Btrfs partitioning, Docker, Dockhand, Server stacks

🚀 Quick Setup (From Zero to Booted System)

1. Initialize or Clone the Template

If you have initialized this from the flake template:

nix flake init -t github:m-uvex/NixOS

Or if you cloned/forked directly:

git clone <your-repo-url> /etc/nixos
cd /etc/nixos

2. Configure Your Primary User

  1. In flake.nix, update the username variable if you want a custom username:
    username = "yourusername";
  2. Rename users/user/ to match your username (e.g. users/yourusername/), or keep it as users/user/.
  3. In users/<username>/default.nix:
    • Set your initialPassword (defaults to "nixos"), or generate a hashed password using:
      mkpasswd -m sha-512
      and replace initialPassword = "nixos"; with hashedPassword = "<hash>";.
    • Add your public SSH key to openssh.authorizedKeys.keys.

3. Choose a Host Archetype & Generate Hardware Config

Choose which host profile fits your machine (desktop, laptop, or server):

# Generate hardware profile for your machine
sudo nixos-generate-config --dir ./hosts/desktop
# (Replace 'desktop' with 'laptop' or 'server' as needed)

This overwrites hosts/<host>/hardware-configuration.nix with your machine's exact drives, UUIDs, and kernel modules, don't mix hardware configs of different machines.

4. Enable Hardware Profiles

Open hosts/<host>/default.nix and uncomment the hardware profiles that match your CPU and GPU:

imports = [
  ./hardware-configuration.nix
  ../../users/user
  ../../modules/core.nix
  ...
  # Uncomment matching hardware profiles:
  ../../modules/hardware/amd-cpu.nix
  ../../modules/hardware/nvidia-desktop.nix
  # ../../modules/hardware/intel-cpu.nix
  # ../../modules/hardware/amd-gpu.nix
];

Available hardware modules under modules/hardware/:

  • CPU: amd-cpu.nix, intel-cpu.nix
  • GPU: nvidia-desktop.nix, nvidia-hybrid.nix, nvidia-legacy.nix, amd-gpu.nix, intel-arc.nix, intel-integrated.nix

5. Build and Install

For a fresh install from a NixOS Live USB:

sudo nixos-install --flake .#desktop
sudo reboot

For an existing NixOS system:

sudo nixos-rebuild switch --flake .#desktop

⚡ The rebuild CLI Tool

OrbitOS provides a unified rebuild CLI with visual package diffs (powered by nh and nvd):

rebuild switch             # Rebuild and switch current host
rebuild update             # Update flake inputs and rebuild
rebuild test               # Test configuration in current session without updating bootloader
rebuild dry                # Preview package additions, upgrades, and diffs
rebuild desktop            # Target a specific host definition
rebuild clean              # Garbage-collect older generations (nh clean all)

🔐 Encrypted SSH Key Sync (secrets/)

OrbitOS provides built-in scripts to back up and restore your ~/.ssh keys encrypted with an age passphrase:

  • Backup keys: Run backup-ssh (or rebuild backup-ssh). It archives ~/.ssh and encrypts it to secrets/ssh.tar.age.
  • Restore keys: Run restore-ssh (or rebuild restore-ssh). When switching to a fresh system, rebuild will automatically detect missing keys and offer to decrypt them for you.

🎨 Adding New Hosts or Users

Adding a New Host

  1. Create a new directory under hosts/<hostname>/.
  2. Add default.nix and generate hardware-configuration.nix.
  3. Add an entry under nixosConfigurations in flake.nix:
    <hostname> = nixpkgs.lib.nixosSystem {
      inherit system specialArgs;
      modules = [
        nix-flatpak.nixosModules.nix-flatpak
        driftwm.nixosModules.default
        home-manager.nixosModules.home-manager
        homeManagerModule
        ./hosts/<hostname>/default.nix
      ];
    };

Adding a New User

  1. Create a new directory under users/<username>/default.nix.
  2. Import the user inside the desired host's default.nix:
    imports = [
      ../../users/<username>
    ];

About

OrbitOS goes brrrr -- Beginner-friendly feature-full multi-host multi-purpose NixOS configs

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages