diff --git a/cluster/part.nix b/cluster/part.nix index eae3222..58e93b3 100644 --- a/cluster/part.nix +++ b/cluster/part.nix @@ -3,6 +3,7 @@ { imports = [ ./catalog + ./simulacrum/checks.nix ]; options.cluster = lib.mkOption { diff --git a/cluster/simulacrum/checks.nix b/cluster/simulacrum/checks.nix new file mode 100644 index 0000000..1d6deb3 --- /dev/null +++ b/cluster/simulacrum/checks.nix @@ -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); + }; +}