nixos/test-instrumentation: add backdoor option

This allows using the test-instrumentation without the backdoor. This is
useful for example for bashless tests.
This commit is contained in:
nikstur
2025-10-09 23:52:38 +02:00
parent 8002da18ab
commit 9cff1cca05
+11 -6
View File
@@ -85,6 +85,9 @@ in
{
options.testing = {
backdoor = lib.mkEnableOption "backdoor service in stage 2" // {
default = true;
};
initrdBackdoor = lib.mkEnableOption ''
backdoor.service in initrd. Requires
@@ -107,12 +110,14 @@ in
}
];
systemd.services.backdoor = lib.mkMerge [
backdoorService
{
wantedBy = [ "multi-user.target" ];
}
];
systemd.services.backdoor = lib.mkIf cfg.backdoor (
lib.mkMerge [
backdoorService
{
wantedBy = [ "multi-user.target" ];
}
]
);
boot.initrd.systemd = lib.mkMerge [
{