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
3 changed files with 28 additions and 0 deletions
Showing only changes of commit b28898c3ae - Show all commits

View file

@ -16,6 +16,7 @@ lib.evalModules {
./lib/port-magic-multi.nix
./lib/mesh.nix
./lib/secrets.nix
./lib/testing.nix
./import-services.nix
];

View file

@ -52,6 +52,24 @@ in
}));
default = {};
};
simulacrum = {
enable = mkEnableOption "testing this service in the Simulacrum";
deps = mkOption {
description = "Other services to include.";
type = with types; listOf str;
default = [];
};
settings = mkOption {
description = "NixOS test configuration.";
type = types.deferredModule;
default = {};
};
augments = mkOption {
description = "Cluster augments (will be propagated).";
type = types.deferredModule;
default = {};
};
};
};
config.otherNodes = builtins.mapAttrs (const filterGroup) config.nodes;
}

9
cluster/lib/testing.nix Normal file
View file

@ -0,0 +1,9 @@
{ lib, ... }:
{
options.simulacrum = lib.mkOption {
description = "Whether we are in the Simulacrum.";
type = lib.types.bool;
default = false;
};
}