This repo stores all my nix configurations. It is modular in terms of host machines, modules and users. The main branch is a rolling release.
Note
Disk partitioning still needs to be done manually for each machine. I did not yet have the nerve to make this declarative.
To bootstrap a new machine with the configuration from withing the installer, follow the official installation guide up to the Create NixOS Config section, or just:
- Make sure networking is working:
ping -c 2 papertoilet.com- Make sure all disks are correctly formatted and mounted:
lsblk -f- Then, after nix flakes are enabled:
export NIX_CONFIG="experimental-features = nix-command flakes"- Clone this repo:
nix-shell -p git vim
git clone https://github.com/inverted-tree/nixos-config.git /mnt/etc/nixos- and generate a host configuration:
nix run .#mkHost -- <hostname> <sitename> <username>- Adapt the generated config:
vim /mnt/etc/nixos/hosts/<newhostname>/default.nix- and then install the OS:
nixos-install --flake /mnt/etc/nixos#<hostname>- Finally, set a root password and reboot.
Note
After the installation has finished and the system has rebooted, sync the dotfiles. Instructions on how to sync them are in the repo's readme.
Warning
This works on my machine — and since it’s Nix, it should work on yours too. No promises, no warranties, no sacrificial goats. See LICENSE.