All checks were successful
nixos / nixos (push) Successful in 3m22s
Each host runs comin, which polls main of this repository every minute, builds nixosConfigurations.<hostname> on the host and switches to it. A branch testing-<hostname> on top of main is applied with `test` to that host alone. Prometheus scrapes comin over the private network, and a failing fetch, evaluation, build or switch alerts after 15 minutes. CI still deploys this commit, which starts comin; the CI deploy job and its SSH key go in the next commit, once comin runs on both hosts. Assisted-by: Claude:opus-5-5
25 lines
770 B
Nix
25 lines
770 B
Nix
# Deploys: each host pulls main of this repository and switches to
|
|
# nixosConfigurations.<its hostname> (comin, polling every minute). CI only
|
|
# evaluates. A branch testing-<hostname> on top of main is applied with
|
|
# `test` (not the boot default) to that host alone: try a change there,
|
|
# then merge it. `comin status` on the host shows what it is doing.
|
|
{ config, ... }:
|
|
{
|
|
services.comin = {
|
|
enable = true;
|
|
remotes = [
|
|
{
|
|
name = "origin";
|
|
url = "https://git.asxp.io/asxpi/iac.git";
|
|
}
|
|
];
|
|
repositorySubdir = "nixos";
|
|
# Prometheus on ops scrapes it over the private network
|
|
exporter = {
|
|
listen_address = config.asxpio.privateIPv4;
|
|
port = 4243;
|
|
};
|
|
};
|
|
|
|
asxpio.security.ports = [ "tcp/4243/comin" ];
|
|
}
|