From e00d4f86c1318ad7c1727bc1baf6ec0033df6aa8 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 26 Jul 2023 18:05:22 +0800 Subject: [PATCH] docs/site: update notes for the project --- .../01-prerequisites/index.adoc | 2 ++ .../02-project-structure/index.adoc | 2 +- .../01-declarative-host-management/index.adoc | 19 +++++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/content/en-US/02-lay-of-the-land/01-prerequisites/index.adoc b/docs/content/en-US/02-lay-of-the-land/01-prerequisites/index.adoc index 33d034b1..548b7f49 100644 --- a/docs/content/en-US/02-lay-of-the-land/01-prerequisites/index.adoc +++ b/docs/content/en-US/02-lay-of-the-land/01-prerequisites/index.adoc @@ -30,6 +30,8 @@ Then run the following command in the shell as root. nixos-install --flake {canonical-flake-url}#INSTALLABLE ---- +Take note most systems have an additional prerequisites such as activating xref:../../04-nixos-modules/03-disko/index.adoc[disko modules] and the private keys that are missing (and other stuff as mentioned from xref:../05-what-should-not-be-here/index.adoc[What should not be here?]). + Despite being a NixOS system, it isn't entirely reproducible to the point of installing this config will work out-of-the-box. It has some things needed in the first place to work like my external backup setup where it needs my SSH private keys to work in the first place. You can see more details from xref:../05-what-should-not-be-here/index.adoc[What should not be here?]. diff --git a/docs/content/en-US/02-lay-of-the-land/02-project-structure/index.adoc b/docs/content/en-US/02-lay-of-the-land/02-project-structure/index.adoc index f4cdcc4b..9f2820e3 100644 --- a/docs/content/en-US/02-lay-of-the-land/02-project-structure/index.adoc +++ b/docs/content/en-US/02-lay-of-the-land/02-project-structure/index.adoc @@ -6,7 +6,7 @@ title: Project structure Last and foremost, we have the project directory — the environment you'll be living in for the next year, tinkering your Nix configs. . It is required to be familiar with the workspace, after all. -My configuration takes a lot of cues from link:{devos_link}[devos] (which is unfortunately is a lot to take if you're just beginning to grok Nix as a whole). +My configuration takes a lot of cues from link:{devos-link}[devos] (which is unfortunately is a lot to take if you're just beginning to grok Nix as a whole). My NixOS config should look like the following: diff --git a/docs/content/en-US/03-project-specific-setup/01-declarative-host-management/index.adoc b/docs/content/en-US/03-project-specific-setup/01-declarative-host-management/index.adoc index 3e2bbefc..ae2b4ec6 100644 --- a/docs/content/en-US/03-project-specific-setup/01-declarative-host-management/index.adoc +++ b/docs/content/en-US/03-project-specific-setup/01-declarative-host-management/index.adoc @@ -7,6 +7,14 @@ This project uses a custom setup for declarative host management. Specifically, it is done with a simple file at github:{github-repo}[`./images.toml`, path=./images.toml, rev=master] where it expects a table of the hosts' metadata. Each host in the table represents one of the hosts at github:{github-repo}[`./hosts/`, path=./hosts/, rev=master]. +Each of declared hosts are then exported as part of the `images` flake output attribute where each is a derivation for building them as an image output. +For example, you can build my personalized NixOS installer ISO with the following command. + +[source, shell, subs=attributes] +---- +nix build {canonical-flake-url}#images.bootstrap +---- + A host metadata has a certain schema which the following example is a complete version of it. The data is then used for certain functions in the flake definition file (i.e., `flake.nix`). @@ -51,8 +59,15 @@ By default, it uses `nixpkgs` flake input which points to the `nixos-unstable` c - `deploy` is a table containing arguments from github:serokell/deploy-rs[opts=repo]. Only a few arguments are accepted (i.e., `hostname`, `fast-connection`, `remote-build`, `magic-rollback`, and `auto-rollback`). -Take note, only certain hosts can be considered as a NixOS configuration (e.g., `nixosConfigurations`). +Take note only certain hosts can be considered as a NixOS configuration (e.g., `nixosConfigurations`). Specifically, those images with a format of `iso` and those without (since they fall back to `iso` anyways). -Those NixOS configuration are then included as part of the deploy nodes for deploy-rs. Otherwise, most images are intended to be built. footnote:[Though, one could create a custom activation and deployment script with deploy-rs.] + +Furthermore, those imported NixOS configurations are also exported as part of the deploy nodes for deploy-rs with the `nixos` prefix. +For example, here's the command to deploy my Plover server. + +[source, shell, subs=attributes] +---- +deploy {canonical-flake-url}#nixos-plover +----