diff --git a/modules/tasks/filesystems.nix b/modules/tasks/filesystems.nix index 9495cac67855..5d6e4a4a3697 100644 --- a/modules/tasks/filesystems.nix +++ b/modules/tasks/filesystems.nix @@ -156,6 +156,16 @@ in description = "Names of supported filesystem types in the initial ramdisk."; }; + boot.ttyEmergency = mkOption { + default = + if pkgs.stdenv.isArm + then "ttyS0" # presumably an embedded platform such as a plug + else "tty1"; + description = '' + The tty that will be stopped in case an emergency shell is spawned + at boot. + ''; + }; }; @@ -247,7 +257,7 @@ in status="$(status xserver || true)" [[ "$status" =~ start/ ]] && exit 0 - stop tty1 || true + stop ${config.boot.ttyEmergency} || true start --no-wait emergency-shell \ DEVICE="$DEVICE" MOUNTPOINT="$MOUNTPOINT"