docs/site: update notes for the project

This commit is contained in:
Gabriel Arazas 2023-07-26 18:05:22 +08:00
parent f1131fb847
commit e00d4f86c1
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
3 changed files with 20 additions and 3 deletions

View File

@ -30,6 +30,8 @@ Then run the following command in the shell as root.
nixos-install --flake {canonical-flake-url}#INSTALLABLE 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. 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. 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?]. You can see more details from xref:../05-what-should-not-be-here/index.adoc[What should not be here?].

View File

@ -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. 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. 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: My NixOS config should look like the following:

View File

@ -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. 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 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. 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`). 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]. - `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`). 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). 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. Otherwise, most images are intended to be built.
footnote:[Though, one could create a custom activation and deployment script with deploy-rs.] 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
----