nixos: add comin, hosts pull their configuration from main
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
This commit is contained in:
Sergei Poljanski 2026-11-17 11:39:03 +04:00
commit 9290a4e181
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -9,6 +9,12 @@
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# The deploy agent (modules/comin.nix)
comin = {
url = "github:nlewo/comin/v0.14.0";
inputs.nixpkgs.follows = "nixpkgs";
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@ -16,6 +22,7 @@
nixpkgs,
nixpkgs-unstable,
sops-nix,
comin,
...
}:
let
@ -26,6 +33,7 @@
specialArgs.unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
modules = [
sops-nix.nixosModules.sops
comin.nixosModules.comin
./modules/hetzner.nix
./modules/base.nix
./modules/shell.nix
@ -33,6 +41,7 @@
./modules/wireguard.nix
./modules/alert.nix
./modules/backup.nix
./modules/comin.nix
./modules/monitoring-agent.nix
]
++ modules;