NixOS flake-based configuration for x86_64 and aarch64 systems.
flake.nix # entry point — defines all host configurations
home.nix # home-manager config for sagetop (x86_64)
setup.sh # scaffolds a new host and adds it to flake.nix
hosts/
sagetop/ # x86_64 desktop
configuration.nix
hardware-configuration.nix
aarch64/ # aarch64 UTM VM
configuration.nix
hardware-configuration.nix
home.nix # home-manager config (aarch64-specific)
i3config # i3 config (aarch64-specific)
dotfiles/ # shared dotfiles
nvim/ # neovim config + custom plugins
i3/ # i3 config (x86_64)
kitty/ # kitty terminal config
polybar/ # polybar config + launch script
scripts/ # wallpaper, launcher, and scratchpad scripts
wallpapers/ # desktop wallpapers
- sagetop (x86_64) — desktop with i3, kitty, polybar, pywal, picom, firefox, SDDM, PipeWire, Bluetooth, Tailscale, and a full dev toolchain
- nixos-arm (aarch64) — UTM VM with i3, st, polybar, pywal, picom, rofi, firefox, SDDM, Docker, SPICE guest integration, and a full dev toolchain
Both hosts share neovim, polybar, wallpaper, and script dotfiles. The aarch64 host has its own i3 config and home-manager config to account for differences like terminal emulator (st vs kitty), launcher (rofi vs dmenu), and VM-specific services (QEMU/SPICE).
If you just want to use an existing config on a new machine without adding a new host to the repo:
git clone https://github.com/<your-username>/nixos-config.git ~/nixos-config
sudo nixos-generate-config --show-hardware-config > ~/nixos-config/hosts/sagetop/hardware-configuration.nix
sudo nixos-rebuild switch --flake ~/nixos-config#sagetopgit clone https://github.com/<your-username>/nixos-config.git ~/nixos-config
sudo nixos-generate-config --show-hardware-config > ~/nixos-config/hosts/aarch64/hardware-configuration.nix
sudo nixos-rebuild switch --flake ~/nixos-config#nixos-armOn a fresh NixOS install, run the setup script to generate your hardware configuration and scaffold a new host:
git clone https://github.com/<your-username>/nixos-config.git ~/nixos-config
cd ~/nixos-config
sudo ./setup.sh <hostname>This will:
- Generate
hardware-configuration.nixfor your machine - Create a
configuration.nixfrom the common template - Let you choose between the full (home.nix) or aarch64 (hosts/aarch64/home.nix) home-manager config
- Add the new host entry to
flake.nix
Then build:
sudo nixos-rebuild switch --flake ~/nixos-config#<hostname>sudo nixos-rebuild switch --flake ~/nixos-config#sagetopsudo nixos-rebuild switch --flake ~/nixos-config#nixos-armA rebuild shell alias is available on both systems, so you can just run:
rebuild