cluster/simulacrum: expose checks
This commit is contained in:
parent
41ab776f8b
commit
f956e4e363
2 changed files with 17 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./catalog
|
./catalog
|
||||||
|
./simulacrum/checks.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.cluster = lib.mkOption {
|
options.cluster = lib.mkOption {
|
||||||
|
|
16
cluster/simulacrum/checks.nix
Normal file
16
cluster/simulacrum/checks.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, extendModules, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
perSystem = { pkgs, ... }: {
|
||||||
|
checks = 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);
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue