diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix index c233beb63ca..f0f56b17f20 100644 --- a/nixos/modules/testing/test-instrumentation.nix +++ b/nixos/modules/testing/test-instrumentation.nix @@ -20,7 +20,15 @@ let kernel = config.boot.kernelPackages.kernel; in export USER=root export HOME=/root export DISPLAY=:0.0 + source /etc/profile + + # Don't use a pager when executing backdoor + # actions. Because we use a tty, commands like systemctl + # or nix-store get confused into thinking they're running + # interactively. + export PAGER= + cd /tmp exec < /dev/hvc0 > /dev/hvc0 while ! exec 2> /dev/ttyS0; do sleep 0.1; done @@ -38,11 +46,6 @@ let kernel = config.boot.kernelPackages.kernel; in systemd.services."serial-getty@ttyS0".enable = false; systemd.services."serial-getty@hvc0".enable = false; - # Don't use a pager when executing backdoor actions. Because we - # use a tty, commands like systemctl or nix-store get confused - # into thinking they're running interactively. - environment.variables.PAGER = ""; - boot.initrd.preDeviceCommands = '' echo 600 > /proc/sys/kernel/hung_task_timeout_secs