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 13 additions and 0 deletions
Showing only changes of commit 62fbeb02c0 - Show all commits

View file

@ -17,6 +17,7 @@ lib.evalModules {
./lib/mesh.nix ./lib/mesh.nix
./lib/secrets.nix ./lib/secrets.nix
./lib/testing.nix ./lib/testing.nix
./lib/lib.nix
./import-services.nix ./import-services.nix
]; ];

12
cluster/lib/lib.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, lib, ... }:
{
options.lib = {
forService = lib.mkOption {
description = "Enable these definitions for a particular service only.";
type = lib.types.functionTo lib.types.raw;
readOnly = true;
default = service: lib.mkIf (!config.simulacrum || lib.any (s: s == service) config.testConfig.activeServices);
};
};
}