fire-flake is a personal Nix flake for setting up a PC/server.
fire-flake is a modular system for setting up and managing personal Linux machines using Nix Flakes and Home Manager.
It aims to:
- Provide an opinionated, repeatable, and well-featured SDE environment recipe out-of-the-box
- Allow the setup to be easily versioned, shared and reproduced across different machines for multiple users
- Be less manual, invasive and flaky (lol, the irony) compared to traditional dotfiles and shell scripts
- Allow system level configuration (for NixOS based systems) under the same framework
git clone https://github.com/adhityaravi/fire-flake.git
cd fire-flake./install-nix.shThis will:
- Install the Nix package manager
- Enable Flakes and experimental features
- Install Home Manager at the user profile level
For bootstrapping a fresh VM (e.g., Hetzner) as a GitHub Actions self-hosted runner:
curl -sL https://raw.githubusercontent.com/adhityaravi/fire-flake/main/fire-flake/scripts/runner-vm-init.sh | sudo bashOr with custom parameters:
curl -sL https://raw.githubusercontent.com/adhityaravi/fire-flake/main/fire-flake/scripts/runner-vm-init.sh | sudo bash -s -- <username> <machine> <git-name> <git-email>Parameters (all optional, with defaults):
username: Linux user to create (default:ivdi)machine: Home-manager configuration to apply (default:oishiioushi)git-name: Git user name (default: username)git-email: Git email (default:<username>@users.noreply.github.com)
After initialization, follow the on-screen instructions to configure the GitHub runner
After installation, apply a machine configuration:
cd fire-flake/fire-flake
home-manager switch --impure --flake .#<machine>Available machines:
kawaiikuma- Full development environment (neovim, lazygit, starship, claude-code, etc.)oishiioushi- Minimal CI/runner environment (git, fish, GitHub runner)
Example:
home-manager switch --impure --flake .#kawaiikumaNote: The --impure flag is required because the configuration uses the $USER environment variable to dynamically locate your vars file.
Users must provide their user-specific information in the vars/ folder:
- Copy
vars/template.nixtovars/<your-linux-username>.nix - Edit with your details (username, email, etc.)
Alternatively, use a private configuration repository like fire-flake-config.
To update dependencies and re-apply:
nix flake update
home-manager switch --impure --flake .#<machine>- Modern Linux OS (Ubuntu, Fedora, Arch, etc.)
- Nix package manager (installed via
install-nix.sh) - Basic Git setup
- SSH keys added to GitHub if configuring via a private repo
Currently intended as a personal project for distro hopping and learning Nix. However, if you find it useful or want to contribute, feel free to open an issue or PR. I will write a proper contributing guide when I have time.
