1 import ./make-test-python.nix ({ pkgs, systemdStage1 ? false, ...} : let
2 msg = "Shutting down NixOS";
4 name = "systemd-shutdown";
5 meta = with pkgs.lib.maintainers; {
6 maintainers = [ das_j ];
10 imports = [ ../modules/profiles/minimal.nix ];
11 systemd.shutdownRamfs.contents."/etc/systemd/system-shutdown/shutdown-message".source = pkgs.writeShellScript "shutdown-message" ''
17 machine.wait_for_unit("multi-user.target")
18 # .shutdown() would wait for the machine to power off
19 machine.succeed("systemctl poweroff")
20 # Message printed by systemd-shutdown
21 machine.wait_for_console_text("Unmounting '/oldroot'")
22 machine.wait_for_console_text("${msg}")
23 # Don't try to sync filesystems
24 machine.booted = False