cluster/lib: implement simulacrum options
This commit is contained in:
parent
bfecfccafc
commit
309b5a33f2
3 changed files with 28 additions and 0 deletions
|
@ -16,6 +16,7 @@ lib.evalModules {
|
||||||
./lib/port-magic-multi.nix
|
./lib/port-magic-multi.nix
|
||||||
./lib/mesh.nix
|
./lib/mesh.nix
|
||||||
./lib/secrets.nix
|
./lib/secrets.nix
|
||||||
|
./lib/testing.nix
|
||||||
|
|
||||||
./import-services.nix
|
./import-services.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -52,6 +52,24 @@ in
|
||||||
}));
|
}));
|
||||||
default = {};
|
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;
|
config.otherNodes = builtins.mapAttrs (const filterGroup) config.nodes;
|
||||||
}
|
}
|
||||||
|
|
9
cluster/lib/testing.nix
Normal file
9
cluster/lib/testing.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.simulacrum = lib.mkOption {
|
||||||
|
description = "Whether we are in the Simulacrum.";
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue