Skip to content

Commit

Permalink
docs(docs/dev/add_host): add sketch notes about adding new hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
trueNAHO committed Feb 10, 2024
1 parent 7937bda commit 75796bb
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/dev/add_host.adoc
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.

0 comments on commit 75796bb

Please sign in to comment.