Commit Graph

170 Commits

Author SHA1 Message Date
Sander van der Burg
11d2cd78e0 - deployment.targetHost is now used for connecting to remote hosts instead of deployment.hostname. This makes more sense.
- fixed error in the manual (nixos-deploy-network => nixos-build-vms)


svn path=/nixos/trunk/; revision=25031
2010-12-07 20:13:50 +00:00
Sander van der Burg
755c30c7a2 - nixos-deploy-network no longer uses an infrastructure model => use nixpkgs.system and deployment.hostname instead
- implemented --no-out-link option so that invoking these tools from scripts leave no garbage behind
- some misc. cleanups


svn path=/nixos/trunk/; revision=25019
2010-12-06 22:02:37 +00:00
Eelco Dolstra
651a38019d * nixos-deploy-network: build the deploy script locally as an
optimisation and workaround for Nix/210.

svn path=/nixos/trunk/; revision=24956
2010-12-02 18:09:53 +00:00
Eelco Dolstra
e97a3d9cb6 * Fix incorrect path to switch-to-configuration.
svn path=/nixos/trunk/; revision=24955
2010-12-02 17:22:24 +00:00
Nicolas Pierron
30943d2dc0 Fix nixos-option, accept long arguments.
svn path=/nixos/trunk/; revision=24631
2010-11-09 18:42:59 +00:00
Sander van der Burg
9c722e474d - Added nixos-build-vms command, which builds a virtual network from a network.nix expression (also used by nixos-deploy-network)
- Added a backdoor option to the interactive run-vms script. This allows me to intergrate the virtual network approach with Disnix
- Small documentation fixes

Some explanation:

The nixos-build-vms command line tool can be used to build a virtual network of a network.nix specification.
For example, a network configuration (network.nix) could look like this:

{
  test1 = 
    {pkgs, config, ...}:
 
    {
      services.openssh.enable = true;
      ...
    };

  test2 =
    {pkgs, config, ...}:
    
    {
      services.openssh.enable = true;
      services.xserver.enable = true;
    }

    ;
}

By typing the following instruction:

$ nixos-build-vms -n network.nix

a virtual network is built, which can be started by typing:

$ ./result/bin/run-vms

It is also possible to enable a backdoor. In this case *.socket files are stored in the current directory
which can be used by the end-user to invoke remote instruction on a VM in the network through a Unix
domain socket.

For example by building the network with the following instructions:

$ nixos-build-vms -n network.nix --use-backdoor

and launching the virtual network:

$ ./result/bin/run-vms

You can find two socket files in your current directory, namely: test1.socket and test2.socket.
These Unix domain sockets can be used to remotely administer the test1 and test2 machine
in the virtual network.

For example by running:

$ socat ./test1.socket stdio
ls /root

You can retrieve the contents of the /root directory of the virtual machine with identifier test1


svn path=/nixos/trunk/; revision=24410
2010-10-21 22:50:12 +00:00
Sander van der Burg
936e4e73d7 Modified the nixos-deploy-network script to use a 2PC-like approach illustrated in the Disnix HotSWUp paper for system configurations
svn path=/nixos/trunk/; revision=24352
2010-10-18 19:47:46 +00:00
Sander van der Burg
122e125d6b Added the nixos-deploy-network tool. With this tool you can write a network of NixOS configurations, e.g.:
{
  test1 = {pkgs, config, ...}:
    {
       # NixOS config of machine test1
       ...
    };

  test2 = {pkgs, config, ...}:
    {
       # NixOS config of machine test2
       ...
    };
}

And an infrastructure expression, e.g:

{
  test1 = {
    hostName = "test1.example.org";
    system = "i686-linux";
  };
  test2 = {
    hostName = "test2.example.org";
    system = "x86_64-linux";
  };
}

And by executing:

nixos-deploy-network -n network.nix -i infrastructure.nix

The system configurations in the network expression are built, transferred to the machines in the network and finally activated. 


svn path=/nixos/trunk/; revision=24146
2010-10-07 14:30:52 +00:00
Eelco Dolstra
17213c4f2a * When generating a GRUB 1 menu, don't use the "module" command to
load the initrd, because pv-grub doesn't like it.

svn path=/nixos/trunk/; revision=24068
2010-10-05 13:11:30 +00:00
Rob Vermaas
7468ad50e0 nixos-option.sh: fix typo
svn path=/nixos/trunk/; revision=24015
2010-10-01 06:31:27 +00:00
Nicolas Pierron
567f37f3e4 Export tools which may be useful for users that want to switch to NixOS
without using a live CD.

svn path=/nixos/trunk/; revision=23939
2010-09-26 13:39:16 +00:00
Nicolas Pierron
62c9591d0b Fix usage message (-description) and honor $NIXOS instead of $NIXOS_PATH.
svn path=/nixos/trunk/; revision=23937
2010-09-26 08:43:55 +00:00
Nicolas Pierron
7ea957fd3d Add --install option for nixos-option which is used to handle options of
the target system (when installing) and also to generate a template
configuration file for users.

svn path=/nixos/trunk/; revision=23923
2010-09-25 22:29:50 +00:00
Nicolas Pierron
fe7c1eb16b Remove duplicated definitions.
svn path=/nixos/trunk/; revision=23921
2010-09-25 09:44:48 +00:00
Nicolas Pierron
e20ef7564e Update live-dvd configuration.
svn path=/nixos/trunk/; revision=23919
2010-09-25 09:33:17 +00:00
Nicolas Pierron
c18fe31160 Make nixos-hardware-scan adding a profile to the generated configuration
file.

svn path=/nixos/trunk/; revision=23918
2010-09-25 09:33:13 +00:00
Nicolas Pierron
5fb80fcc4b Extract rescue profile from the the corresponding CD.
svn path=/nixos/trunk/; revision=23917
2010-09-25 09:33:09 +00:00
Nicolas Pierron
9936a6f525 Simplify system-tarball-pc.nix. Factor detected / undetected devices into
the instalaltion-device profile.

svn path=/nixos/trunk/; revision=23916
2010-09-25 09:33:03 +00:00
Nicolas Pierron
f3cc01bd3b Extract graphical and minimal profiles from the installation CDs.
svn path=/nixos/trunk/; revision=23915
2010-09-25 09:32:57 +00:00
Nicolas Pierron
59429aa449 Change the policy used to select files added in the import list of the
generated configuration.  Use all files listed as modules of eval-config.

svn path=/nixos/trunk/; revision=23914
2010-09-25 09:32:52 +00:00
Nicolas Pierron
d2d139e920 Move the generation of the dummy configuration file into the installation
device profile.

TODO: The current configuration does not reproduce exactly the CD
configuration, fix it.

svn path=/nixos/trunk/; revision=23913
2010-09-25 09:32:48 +00:00
Nicolas Pierron
112cd0c4d4 Add an installation device profile, and use it it the basic installation CD.
svn path=/nixos/trunk/; revision=23912
2010-09-25 09:32:43 +00:00
Nicolas Pierron
cf103b8d4d Add 2 index file to define the default case for detected and not-detected
devices.  These are used to replace hand made listings in the basic
installation CD.

The configuration file, which is generated by nixos-hardware-scan, enables
not-detected devices by default.

svn path=/nixos/trunk/; revision=23911
2010-09-25 09:32:37 +00:00
Nicolas Pierron
c90a7b9be4 Remove duplicated (modules-list) includes from the basic installation cd.
svn path=/nixos/trunk/; revision=23910
2010-09-25 09:32:32 +00:00
Nicolas Pierron
d304d12f37 Extract a base profile from the basic installation cd.
svn path=/nixos/trunk/; revision=23909
2010-09-25 09:32:27 +00:00
Eelco Dolstra
c4f910f550 * Substitute the path of the system derivation directly in the stage 2
init script.  This removes the need for the `systemConfig' boot
  parameter; `init=<stage-2-init>' is enough.  However, the GRUB menu
  builder still needs to add `systemConfig' to the kernel command line
  for compatibility with old configurations.

svn path=/nixos/trunk/; revision=23775
2010-09-13 22:10:25 +00:00
Eelco Dolstra
c1295661c4 * Added a command `nixos-rebuild build-vm-with-bootloader'. This is
like `build-vm', but boots using the regular boot loader (i.e. GRUB
  1 or 2) rather than booting directly from the kernel/initrd.  Thus
  it allows testing of GRUB.

svn path=/nixos/trunk/; revision=23747
2010-09-13 12:34:58 +00:00
Eelco Dolstra
987dd76811 * Added a module to enable the Xen hypervisor.
svn path=/nixos/trunk/; revision=23739
2010-09-12 22:43:45 +00:00
Eelco Dolstra
8edefa2960 * Grrr. Fix the sort order.
svn path=/nixos/trunk/; revision=23732
2010-09-10 17:35:13 +00:00
Eelco Dolstra
4ae4b7d47f * Support booting Xen in the Grub menu builder.
svn path=/nixos/trunk/; revision=23730
2010-09-10 17:15:35 +00:00
Eelco Dolstra
8f4139987e * Regex listing the system generations was selecting the number from
only the first generation in the list.  (From Karn Kallio.)

svn path=/nixos/trunk/; revision=23728
2010-09-10 15:47:06 +00:00
Eelco Dolstra
7b635ee4ed * "ls -d" -> "echo", since "ls" prints the current directory if
nothing matches.

svn path=/nixos/trunk/; revision=23716
2010-09-10 12:25:59 +00:00
Nicolas Pierron
c9dc3651da Replace mkOverride by its alias mkOverrideTemplate to remove the unused
template argument of mkOverride later.

svn path=/nixos/trunk/; revision=23631
2010-09-03 19:10:59 +00:00
Nicolas Pierron
1f69bc4b9d Remove deprecated notation in tools.nix.
svn path=/nixos/trunk/; revision=23630
2010-09-03 19:10:54 +00:00
Nicolas Pierron
9e04f67b3d Add nixos-option tool to investigate option details on the cmd-line.
svn path=/nixos/trunk/; revision=23629
2010-09-03 19:10:50 +00:00
Michael Raskin
597e083d82 Adding an option to include build dependencies into ISO image
svn path=/nixos/trunk/; revision=23502
2010-08-29 12:11:31 +00:00
Eelco Dolstra
8c960af984 * Handle the case where /boot is on the same filesystem as /
but on a different filesystem than /nix/store.  In that case
  we need to copy the kernels and initrds to /boot.

svn path=/nixos/trunk/; revision=23085
2010-08-10 08:36:59 +00:00
Eelco Dolstra
cbc05c1480 * Enable wpa_supplicant on the installation CD.
svn path=/nixos/trunk/; revision=23034
2010-08-08 13:55:35 +00:00
Eelco Dolstra
e8e7ee356c * In the installation CD, pass the label of the CD through the
root=... kernel command line parameter, instead of hard-coding it in
  `fileSystems'.  This is to allow CD-to-USB converters such as
  UNetbootin to rewrite the kernel command line to the label or UUID
  of the USB stick.

svn path=/nixos/trunk/; revision=23024
2010-08-07 14:16:18 +00:00
Eelco Dolstra
d7d2d5e3d5 * Add some NLS modules required to mount FAT filesystems. We need
this to boot the NixOS installer from a USB stick.

svn path=/nixos/trunk/; revision=23019
2010-08-06 23:09:37 +00:00
Eelco Dolstra
05fc10f3a8 * Add dosfstools to the installation CD (for
{mkfs,fsck}.{vfat,msdos}).

svn path=/nixos/trunk/; revision=23006
2010-08-06 18:52:00 +00:00
Eelco Dolstra
d659488209 * Use the regular GRUB menu builder for Amazon. There are two issues:
we want to generate the GRUB menu without actually installing GRUB
  (because Amazon supplies its own pv-grub), and each menu entry
  requires "root (hd0)".  For the first, allow boot.loader.grub.device
  to be set to "nodev" to indicate that the GRUB menu should be
  generated without installing GRUB.  For the second, add an option
  boot.loader.grub.extraPerEntryConfig to allow commands to be added
  to each GRUB menu entry (in this case, "root (hd0)").

svn path=/nixos/trunk/; revision=22712
2010-07-22 14:40:29 +00:00
Eelco Dolstra
f1dde44ac1 * Added an action `nixos-rebuild pull' to just pull the Nixpkgs
channel manifest and exit.  Useful if you don't want to use
  nix-channel.

svn path=/nixos/trunk/; revision=22601
2010-07-14 14:18:27 +00:00
Eelco Dolstra
baf54c517d * Fix the terminal_output command. (This used to work but not with
the latest GRUB I guess.)

svn path=/nixos/trunk/; revision=22575
2010-07-13 11:48:40 +00:00
Eelco Dolstra
54d201294b * Sync with the trunk.
svn path=/nixos/branches/boot-order/; revision=22487
2010-07-06 08:21:05 +00:00
Lluís Batlle i Rossell
41cc6ecdbb Trying to make the nixos-bootstrap-archive (nixos-minimal-archive in other places named) to have an
hydra build product for easy tarball download.


svn path=/nixos/trunk/; revision=22440
2010-07-01 17:54:03 +00:00
Eelco Dolstra
d43d321e86 * Sync with the trunk.
svn path=/nixos/branches/boot-order/; revision=22349
2010-06-20 20:54:31 +00:00
Eelco Dolstra
a65b5ec81c * Added an option boot.loader.grub.extraConfig to add commands to
grub.cfg before the menu entries.  (This could also be done using
  `extraEntriesBeforeNixOS', but then you can't have entries *after*
  the main entry anymore.)
* In the installer test, redirect GRUB output to the serial port.

svn path=/nixos/branches/boot-order/; revision=22300
2010-06-16 22:18:26 +00:00
Lluís Batlle i Rossell
f69d7b1768 Fixing my previous bad commit on stat. Thank you David!
svn path=/nixos/trunk/; revision=22297
2010-06-16 15:17:02 +00:00
Lluís Batlle i Rossell
fbb3046a87 Making the grub menu builder take a better path at distinguishing if / and /boot are different fs.
I chose %D over %d because I like hex more.


svn path=/nixos/trunk/; revision=22294
2010-06-16 13:58:15 +00:00