From bd2c3d5902bebeb6aa71c6af5f331e1e9f1c3cfe Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sun, 10 Mar 2024 20:56:54 +0800 Subject: [PATCH] docs: how to add a new machine --- hosts/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/README.md b/hosts/README.md index 03869664..676ad703 100644 --- a/hosts/README.md +++ b/hosts/README.md @@ -19,6 +19,18 @@ 1. `rakushun`: Orange Pi 5 Plus, RK3588(4xA76 + 4xA55), GPU(4Cores, Mail-G610), NPU(6Tops@int8), 16G RAM + 2T SSD. 6. `k8s`: My Kubernetes Clusters +## How to add a new host + +1. Under `hosts/` + 1. Create a new folder under `hosts/` with the name of the new host. + 2. Create & add the new host's `hardware-configuration.nix` to the new folder, and add the new host's `configuration.nix` to `hosts//default.nix`. + 3. If the new host need to use home-manager, add its custom config into `hosts//home.nix`. +1. Under `outputs/` + 1. Add a new nix file named `outputs//src/.nix`. + 2. Copy the content from one of the existing host's nix file, and modify it to fit the new host. + 3. [Optional] Add a new unit test file under `outputs//tests/.nix` to test the new host's nix file. + 4. [Optional] Add a new integration test file under `outputs//integration-tests/.nix` to test whether the new host's nix config can be built and deployed correctly. + ## idols - Oshi no Ko These four servers are named after the four main characters of the mange/anime Oshi no Ko.