mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 19:23:50 +00:00
23551d0a4d
svn path=/nixos/trunk/; revision=13419
75 lines
1.6 KiB
Nix
75 lines
1.6 KiB
Nix
{
|
|
platform ? __currentSystem
|
|
,hostConnectPort ? "3737"
|
|
,sshPubKey ? /var/certs/ssh/id_livedvd.pub
|
|
} :
|
|
let
|
|
isoFun = import ./rescue-cd-configurable.nix;
|
|
in
|
|
(isoFun {
|
|
inherit platform;
|
|
|
|
networkNixpkgs = "";
|
|
manualEnabled = true;
|
|
rogueEnabled = false;
|
|
sshdEnabled = true;
|
|
fontConfigEnabled = false;
|
|
sudoEnable = true;
|
|
includeMemtest = false;
|
|
includeStdenv = true;
|
|
includeBuildDeps = true;
|
|
|
|
/*
|
|
If anyone uses that DVD on live
|
|
computer, use DHCP; but also add
|
|
a rogue address for tests in virtual
|
|
networks without DHCP at all.
|
|
*/
|
|
addIP = "10.0.253.251";
|
|
netmask = "255.255.0.0";
|
|
|
|
packages = pkgs : [
|
|
pkgs.patch
|
|
pkgs.irssi
|
|
pkgs.subversion
|
|
pkgs.w3m
|
|
pkgs.utillinuxCurses
|
|
pkgs.wpa_supplicant
|
|
pkgs.emacs
|
|
pkgs.vimHugeX
|
|
pkgs.socat
|
|
];
|
|
|
|
/*
|
|
The goal is remotely controlled
|
|
installation (maybe over virtual
|
|
networking with QEmu without human
|
|
interaction), so let's make ssh
|
|
work without manual password entry
|
|
*/
|
|
additionalFiles = [
|
|
{
|
|
source = sshPubKey;
|
|
target = "/root/.ssh/authorized_keys";
|
|
}
|
|
];
|
|
|
|
additionalJobs = [
|
|
{
|
|
name = "Socat-ssh-proxy";
|
|
job = ''
|
|
start on sshd/started
|
|
script
|
|
sleep 5
|
|
/var/run/current-system/sw/bin/socat tcp:10.0.2.2:${hostConnectPort} tcp:127.0.0.1:22
|
|
end script
|
|
'';
|
|
}
|
|
];
|
|
nix = pkgs: pkgs.nixCustomFun (pkgs.nixUnstable.src)
|
|
""
|
|
["nix-reduce-build" "nix-http-export.cgi"]
|
|
["--with-docbook-xsl=\\\${pkgs.docbook5_xsl}/xml/xsl/docbook/"];
|
|
extraInitrdKernelModules = ["usb_storage" "ehci_hcd" "ohci_hcd" "iso9660" "ext3"];
|
|
}).rescueCD
|