dotfiles/provision/readme.md

36 lines
1.4 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
3. 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 like `htpc` and `wsl` either do not require a `hardware.nix` file or the flake imports `hardware-configuration.nix` from `/etc/nixos`.
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 --impure --flake .#<host>
2024-09-29 21:15:53 -07:00
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.
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.