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
76 lines
1.9 KiB
Nix
76 lines
1.9 KiB
Nix
{
|
|
description = "asxp.io servers";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
|
# For the few packages 26.05 has older than what production runs
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
sops-nix = {
|
|
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 =
|
|
{
|
|
nixpkgs,
|
|
nixpkgs-unstable,
|
|
sops-nix,
|
|
comin,
|
|
...
|
|
}:
|
|
let
|
|
mkHost =
|
|
modules:
|
|
nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
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
|
|
./modules/podman.nix
|
|
./modules/wireguard.nix
|
|
./modules/alert.nix
|
|
./modules/backup.nix
|
|
./modules/comin.nix
|
|
./modules/monitoring-agent.nix
|
|
]
|
|
++ modules;
|
|
};
|
|
in
|
|
{
|
|
# `nix develop ./nixos`: every tool the READMEs call
|
|
devShells.x86_64-linux.default =
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
in
|
|
pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
opentofu
|
|
hcloud
|
|
nixos-rebuild
|
|
sops
|
|
ssh-to-age
|
|
age
|
|
restic
|
|
rclone
|
|
jq
|
|
openssh
|
|
];
|
|
};
|
|
|
|
nixosConfigurations = {
|
|
asxpio-ops = mkHost [ ./hosts/asxpio-ops ];
|
|
asxpio-services = mkHost [ ./hosts/asxpio-services ];
|
|
};
|
|
};
|
|
}
|