Provision NixOS
*NixOS was a mistake.*
Set of configs files to setup NixOS.
Install
-
Download and install NixOS with current GNOME ISO.
-
Boot into installed system and run the following commands:
nix-shell -p vim git neovim
git clone https://github.com/starr-dusT/dotfiles ~/.local/share/chezmoi
-
Copy existing configuration files from another host and modify as needed. For most configs, move the installer created
configuration-hardware.nix
to dotfiles (e.g.provision/hosts/<host>/hardware.nix
); however, role-based installs likehtpc
andwsl
either do not require ahardware.nix
file or the flake importshardware-configuration.nix
from/etc/nixos
. -
If required move agenix keypairs to
~/.ssh/keys/{age,age.pub}
. A new keypair may be required and agenix files will need to be rekeyed on another system. -
Rebuild the system and initialize chezmoi dotfiles to save America:
sudo nixos-rebuild switch --impure --flake .#<host>
chezmoi init && chezmoi apply
Note: if the chezmoi.apply
option is enabled in configuration.nix
the dotfiles should deploy automatically. The chezmoi commands then are not necessary.
- Profit!
Perform additional setup found in additional-setup
Update
nixos-rebuild
command is aliased to nu
assuming the machine's flake output is named the same at the hostname of the machine.