# A layer for testing in qemu (see default.nix): a root shell script run # at the end of boot, whose output goes to the console (the test's # stdout). (virtio_pci, which qemu needs, is in the base system.) script: { pkgs, config, lib, ... }: { systemd.services.rig-test = { wantedBy = [ "multi-user.target" ]; after = [ "multi-user.target" ]; path = [ pkgs.util-linux pkgs.coreutils "/run/current-system/sw" ]; environment = lib.mkIf config.rig.nix { NIX_REMOTE = "daemon"; NIX_PATH = "nixpkgs=/nixpkgs"; }; serviceConfig.StandardOutput = "tty"; serviceConfig.StandardError = "tty"; serviceConfig.TTYPath = "/dev/console"; inherit script; }; }