- Flakes enabled
Enter the development shell with nix develop. Run nix fmt to format the repo.
This repository follows the dendritic pattern.
Nix files (they're all flake-parts modules) are automatically imported. Nix files prefixed with an underscore are ignored. No literal path imports are used. This means files can be moved around and nested in directories freely.
The bootstrap-nixos application performs a one-shot NixOS install on a remote machine using nixos-anywhere.
In nix develop:
bootstrap-nixos -n <hostname> -d <ip-or-domain> -k <ssh_key> [OPTIONS]| Flag | Description |
|---|---|
-n <hostname> |
Hostname as defined in the flake (e.g. homelab) |
-d <destination> |
IP or DNS of the target machine |
-k <ssh_key> |
Path to the private SSH key used for install |
| Flag | Description |
|---|---|
-u <user> |
SSH user with sudo (default: current user) |
--port <port> |
SSH port (default: 22) |
--secureboot |
Enable Secure Boot + TPM2 auto-unlock setup |
--debug |
Enable bash xtrace for troubleshooting |
-h, --help |
Show help |
- Generates a target SSH host key and derives an age recipient so secrets are ready day-0
- Optionally captures
hardware-configuration.nixfrom the target before install - Extracts disk encryption keys from sops secrets (if configured)
- Runs
nixos-anywhereto install the flake on the target (builds locally) - Syncs the dotnix and secrets repositories to the target
- With
--secureboot: generates Secure Boot keys, rebuilds with lanzaboote, enrolls keys in firmware, and configures TPM2 auto-unlock - Optionally stages, commits, and pushes all changes to git
Using --secureboot requires three pieces of configuration in the flake:
-
Include the
encryptionmodule in the host's module list (e.g.modules/hosts/<hostname>/modules.nix):configurations.nixos.<hostname>.modules = { inherit (config.flake.modules.nixos) base encryption # provides lanzaboote, TPM2 initrd support, and sbctl/tpm2-tools # ... ; };
-
Mark disk groups as encrypted in the host's configuration (e.g.
modules/hosts/<hostname>/configuration.nix):system.disks."/" = { devices = [ "/dev/nvme0n1" ]; encryptDrives = true; # wraps partitions in LUKS via disko };
The
encryptionPasswordFileoption defaults to/tmp/disk-secret.key, which is where the bootstrap script places the key during install. -
Add an encryption key to the secrets repository (
secrets.yaml):drive-encryption-keys: <hostname>: "your-encryption-password-here"
The bootstrap script extracts this value via
sops -d --extract '["drive-encryption-keys"]["<hostname>"]'and passes it tonixos-anywhereat install time.
- mightyjam for the Dendritic Pattern
- nekowinston for the nixppuccin wallpaper
- redyf for the bar and some Hyprland configuration
- sioodmy for their NixOS and Hyprland configuration and badges
- IogaMaster for the most beautiful catppuccin nix flake, some Hyprland config, and the badges
- This reddit post for helping me figure out the bare minimum to get Hyprland running
- AMD GPU minimum required config here

