-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(docs/dev/add_host): add sketch notes about adding new hosts
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
= os.dev.add-host(8) | ||
|
||
== Name | ||
|
||
os.dev.add-host - Add a new host | ||
|
||
== Configuration | ||
|
||
To add a new host, complete the following steps: | ||
|
||
. Add the new host configuration to the `hosts/<HOST>` directory | ||
. Update the `flake.nix` packages and checks | ||
. Update the `hosts/default.nix` file | ||
|
||
== Deployment | ||
|
||
To deploy a new host, complete the following steps based on the more complete | ||
instructions given in `hosts/<HOST>/README.adoc`: | ||
|
||
. Clone Repository | ||
. Format all Disks | ||
. Update Hardware Configuration | ||
. Install NixOS | ||
. `poweroff` | ||
|
||
Properly deploying `agenix` requires adding the public SSH key of the new host | ||
to the `secrets.nix` file, and re-keying all secrets, using `agenix --rekey`. | ||
The SSH keys can be deployed in two ways. Either the SSH keys is generated and | ||
added the repository prior to the installation process, or the SSH keys are | ||
generated during the installation, although this requires patching upstream | ||
during the installation process. | ||
|
||
Although the generated hardware configuration should be patched upstream, it can | ||
also be done at a later point, as the installation can be completed by | ||
overwriting the template hardware configuration in the local repository clone. | ||
Make sure to that the hardware configuration does not disappear after the | ||
installation process, by for example adding it to an external drive or storing | ||
it in the `/persistent` directory. |