From bf024b96ea80780ee027c0d5b214017b37d51bf1 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Sat, 10 Feb 2024 00:44:51 +0100 Subject: [PATCH] docs(docs/dev/add_host): add sketch notes about adding new hosts --- docs/dev/add_host.adoc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/dev/add_host.adoc diff --git a/docs/dev/add_host.adoc b/docs/dev/add_host.adoc new file mode 100644 index 0000000..553096c --- /dev/null +++ b/docs/dev/add_host.adoc @@ -0,0 +1,30 @@ += os.dev.add-host(8) + +== Configuration + +To add a new host, add the host configuration to the `hosts/` directory. + +== Deployment + +To deploy a new host, complete the following steps based on the more complete +instructions given in `hosts//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.