The Simulacrum: Stage 1 #108

Merged
max merged 15 commits from pr-simulacrum-stage-1 into master 2024-08-13 22:06:49 +03:00
2 changed files with 17 additions and 0 deletions
Showing only changes of commit 4b76b6ed47 - Show all commits

View file

@ -3,6 +3,7 @@
{ {
imports = [ imports = [
./catalog ./catalog
./simulacrum/checks.nix
]; ];
options.cluster = lib.mkOption { 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));
};
}