dotfiles/provision/readme.md

35 lines
1.1 KiB
Markdown
Raw Normal View History

2024-10-16 10:56:56 -07:00
# Provision NixOS
2023-07-23 14:34:39 -07:00
> \*NixOS was a mistake.\*
Set of configs files to setup NixOS.
2024-10-16 10:56:56 -07:00
## Install
2023-07-23 14:34:39 -07:00
2024-10-16 10:56:56 -07:00
1. Download and install [NixOS](https://nixos.org/download/) with current GNOME ISO.
2023-07-23 14:34:39 -07:00
2024-10-16 10:56:56 -07:00
2. Boot into installed system and run the following commands:
2023-07-23 14:34:39 -07:00
2024-09-29 21:15:53 -07:00
```bash
2024-10-16 10:56:56 -07:00
nix-shell -p vim git neovim
2024-09-29 21:15:53 -07:00
git clone https://github.com/starr-dusT/dotfiles ~/.local/share/chezmoi
```
2023-07-23 14:34:39 -07:00
2024-10-16 10:56:56 -07:00
3. Copy existing configuration files from another host and modify as needed. Make sure to move the installer created configuration-hardware.nix to dotfiles (e.g. `provision/hosts/<host>/hardware.nix`).
2023-07-23 14:34:39 -07:00
2024-10-16 10:56:56 -07:00
4. 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.
5. Rebuild the system and initialize chezmoi dotfiles to save America:
2024-09-29 21:15:53 -07:00
```bash
sudo nixos-rebuild switch --flake .#<host>
chezmoi init && chezmoi apply
```
2023-07-23 14:34:39 -07:00
2024-10-16 10:56:56 -07:00
6. Profit!
2023-07-23 14:34:39 -07:00
Perform additional setup found in [additional-setup](additional-setup.md)
## Update
2024-10-16 10:56:56 -07:00
`nixos-rebuild` command is aliased to `nu` assuming the machine's flake output is named the same at the hostname of the machine.