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:
@@ -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 [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user