diff --git a/configuration/rescue-cd.nix b/configuration/rescue-cd.nix index 75da817481f..755cbf0da82 100644 --- a/configuration/rescue-cd.nix +++ b/configuration/rescue-cd.nix @@ -49,7 +49,7 @@ rec { job = " start on udev stop on shutdown - respawn ${pkgs.w3m}/bin/w3m ${import ../doc/manual}/manual.html < /dev/tty7 > /dev/tty7 2>&1 + respawn ${pkgs.w3m}/bin/w3m ${manual} < /dev/tty7 > /dev/tty7 2>&1 "; } @@ -126,6 +126,14 @@ rec { pkgs = system.pkgs; + # The NixOS manual, with a backward compatibility hack for Nix <= + # 0.11 (you won't get the manual). + manual = + if builtins ? unsafeDiscardStringContext + then "${import ../doc/manual}/manual.html" + else pkgs.writeText "dummy-manual" "Manual not included in this build!"; + + # Since the CD is read-only, the mount points must be on disk. cdMountPoints = pkgs.runCommand "mount-points" {} " ensureDir $out