0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

testing-instrumentation: Factor backdoor service out to variable

This commit is contained in:
Will Fancher 2023-09-19 23:30:52 -04:00
parent cfbb29d769
commit f8ba8be54b

View file

@ -7,14 +7,9 @@ with lib;
let
qemu-common = import ../../lib/qemu-common.nix { inherit lib pkgs; };
in
{
config = {
systemd.services.backdoor =
{ wantedBy = [ "multi-user.target" ];
backdoorService = {
wantedBy = [ "multi-user.target" ];
requires = [ "dev-hvc0.device" "dev-${qemu-common.qemuSerialDevice}.device" ];
after = [ "dev-hvc0.device" "dev-${qemu-common.qemuSerialDevice}.device" ];
script =
@ -50,6 +45,14 @@ in
serviceConfig.KillSignal = "SIGHUP";
};
in
{
config = {
systemd.services.backdoor = backdoorService
# Prevent agetty from being instantiated on the serial device, since it
# interferes with the backdoor (writes to it will randomly fail
# with EIO). Likewise for hvc0.