Skip to content

Commit

Permalink
docs/infrastructure: embed host config json
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Feb 1, 2025
1 parent f83732c commit 133bdce
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 1 deletion.
28 changes: 27 additions & 1 deletion dev/docs.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{ self, ... }:
{
perSystem =
{ config, pkgs, ... }:
Expand All @@ -20,7 +21,8 @@
};
}
''
cd $files
cp --no-preserve=mode -r $files/* .
cp --no-preserve=mode ${config.packages.docs-json}/*.json docs
mkdocs build --strict --site-dir $out
'';
docs-linkcheck = pkgs.testers.lycheeLinkCheck rec {
Expand All @@ -33,6 +35,30 @@
};
site = config.packages.docs;
};
docs-json =
pkgs.runCommand "docs-json"
{
buildInputs = [ pkgs.jq ];
hosts = pkgs.writeText "hosts.json" (
builtins.toJSON (
pkgs.lib.mapAttrs (_: x: {
experimental-features = x.config.nix.settings.experimental-features or [ ];
extra-platforms = x.config.nix.settings.extra-platforms or [ ];
system-features = x.config.nix.settings.system-features or [ ];
inherit (x.config.nixpkgs.hostPlatform) system;
inherit (x.config.nix.settings) sandbox;
}) (self.darwinConfigurations // self.nixosConfigurations)
)
);
}
''
mkdir -p $out
for host in $(jq -r 'keys[]' $hosts); do
jq --arg host "$host" \
'.[$host] | walk(if type == "array" then sort else . end)' \
--sort-keys < $hosts > $out/$host.json
done
'';
};
};
}
2 changes: 2 additions & 0 deletions docs/community-builders.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ aarch64-build-box.nix-community.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG9uyfhy
darwin-build-box.nix-community.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKMHhlcn7fUpUuiOFeIhDqBzBNFsbNqq+NpzuGX3e6zv
```

See [here](./infrastructure.md#community-builders) for details about the hardware.

### Access

We will grant access to well known members of the community, and people well known members in the community trust.
Expand Down
2 changes: 2 additions & 0 deletions docs/continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Both `aarch64-linux` and `x86_64-linux` have support for `kvm`/`nixos-test`.

We only have limited build capacity for `*-darwin` so please don't use it excessively.

See [here](./infrastructure.md#continuous-integration) for details about the hardware.

#### Buildbot

[https://buildbot.nix-community.org](https://buildbot.nix-community.org)
Expand Down
28 changes: 28 additions & 0 deletions docs/infrastructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
- RAM: 128GB DDR4 ECC
- Drives: 2 x 1.92TB NVME

```json
--8<-- "docs/build01.json"
```

#### [`aarch64-build-box.nix-community.org`](./community-builders.md) - `build05`

- Provider: Hetzner
Expand All @@ -15,6 +19,10 @@
- RAM: 128GB DDR4 ECC
- Drives: 2 x 960GB NVME

```json
--8<-- "docs/build05.json"
```

#### [`darwin-build-box.nix-community.org`](./community-builders.md) - `darwin01`

- Provider: OakHost
Expand All @@ -23,6 +31,10 @@
- RAM: 32GB
- Drives: 1TB SSD

```json
--8<-- "docs/darwin01.json"
```

### Continuous Integration

#### [`CI builder`](./continuous-integration.md) - `build03`
Expand All @@ -33,6 +45,10 @@
- RAM: 256GB DDR5 ECC
- Drives: 2 x 1.92TB NVME

```json
--8<-- "docs/build03.json"
```

#### [`CI builder`](./continuous-integration.md) - `build04`

- Provider: Hetzner
Expand All @@ -41,6 +57,10 @@
- RAM: 128GB DDR4 ECC
- Drives: 2 x 960GB NVME

```json
--8<-- "docs/build04.json"
```

#### [`CI builder`](./continuous-integration.md) - `darwin02`

- Provider: OakHost
Expand All @@ -49,6 +69,10 @@
- RAM: 32GB
- Drives: 1TB SSD

```json
--8<-- "docs/darwin02.json"
```

### Other

#### [`R. RyanTM nixpkgs-update bot`](./update-bot.md) - `build02`
Expand All @@ -58,6 +82,10 @@
- RAM: 128GB DDR4 ECC
- Drives: 2 x 1.92TB NVME

```json
--8<-- "docs/build02.json"
```

#### [`Monitoring`](./monitoring.md) - `web02`

- Provider: Gandi
Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ theme:
markdown_extensions:
- attr_list
- md_in_html
- pymdownx.snippets
- pymdownx.superfences
- toc:
toc_depth: 0

Expand Down

0 comments on commit 133bdce

Please sign in to comment.