mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 12:43:52 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
import ./make-test-python.nix (
|
|
{ lib, pkgs, ... }:
|
|
{
|
|
name = "systemd-initrd-vconsole";
|
|
|
|
nodes.machine =
|
|
{ pkgs, ... }:
|
|
{
|
|
boot.kernelParams = lib.mkAfter [
|
|
"rd.systemd.unit=rescue.target"
|
|
"loglevel=3"
|
|
"udev.log_level=3"
|
|
"systemd.log_level=warning"
|
|
];
|
|
|
|
boot.initrd.systemd = {
|
|
enable = true;
|
|
emergencyAccess = true;
|
|
};
|
|
|
|
console = {
|
|
earlySetup = true;
|
|
keyMap = "colemak";
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
# Boot into rescue shell in initrd
|
|
machine.start()
|
|
machine.wait_for_console_text("Press Enter for maintenance")
|
|
machine.send_console("\n")
|
|
|
|
# Wait for shell to become ready
|
|
for _ in range(300):
|
|
machine.send_console("printf '%s to receive commands:\\n' Ready\n")
|
|
try:
|
|
machine.wait_for_console_text("Ready to receive commands:", timeout=1)
|
|
break
|
|
except Exception:
|
|
continue
|
|
else:
|
|
raise RuntimeError("Rescue shell never became ready")
|
|
|
|
# Check keymap
|
|
machine.send_console("(printf '%s to receive text:\\n' Ready && read text && echo \"$text\") </dev/tty1\n")
|
|
machine.wait_for_console_text("Ready to receive text:")
|
|
for key in "asdfjkl;\n":
|
|
machine.send_key(key)
|
|
machine.wait_for_console_text("arstneio")
|
|
'';
|
|
}
|
|
)
|