cluster/simulacrum: expose checks

This commit is contained in:
Max Headroom 2024-07-23 20:05:21 +02:00
parent 030b680b33
commit fe8ddd4094
2 changed files with 17 additions and 0 deletions

View file

@ -3,6 +3,7 @@
{
imports = [
./catalog
./simulacrum/checks.nix
];
options.cluster = lib.mkOption {

View file

@ -0,0 +1,16 @@
{ config, extendModules, lib, ... }:
{
perSystem = { pkgs, system, ... }: {
checks = lib.mkIf (system == "x86_64-linux") (lib.mapAttrs' (name: svc: let
runSimulacrum = pkgs.callPackage ./. {
inherit config extendModules;
};
in {
name = "simulacrum-${name}";
value = runSimulacrum {
service = name;
};
}) (lib.filterAttrs (_: svc: svc.simulacrum.enable) config.cluster.config.services));
};
}