summary refs log tree commit diff
path: root/modules/virtualisation/xen-domU.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-10-05 15:44:40 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-10-05 15:44:40 +0000
commit8b5fba494220b31726a90409db18dbd123224cb5 (patch)
treeda3510616687d06a6bade216b6c1bdb36546e583 /modules/virtualisation/xen-domU.nix
parent35562ea4a3f3557449121e4eae1fe3b4d0471304 (diff)
downloadnixpkgs-8b5fba494220b31726a90409db18dbd123224cb5.tar
nixpkgs-8b5fba494220b31726a90409db18dbd123224cb5.tar.gz
nixpkgs-8b5fba494220b31726a90409db18dbd123224cb5.tar.bz2
nixpkgs-8b5fba494220b31726a90409db18dbd123224cb5.tar.lz
nixpkgs-8b5fba494220b31726a90409db18dbd123224cb5.tar.xz
nixpkgs-8b5fba494220b31726a90409db18dbd123224cb5.tar.zst
nixpkgs-8b5fba494220b31726a90409db18dbd123224cb5.zip
* Added a module that provides common configuration for DomU
  machines.

svn path=/nixos/trunk/; revision=24084
Diffstat (limited to 'modules/virtualisation/xen-domU.nix')
-rw-r--r--modules/virtualisation/xen-domU.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/virtualisation/xen-domU.nix b/modules/virtualisation/xen-domU.nix
new file mode 100644
index 00000000000..f4cbaf24c2b
--- /dev/null
+++ b/modules/virtualisation/xen-domU.nix
@@ -0,0 +1,23 @@
+# Common configuration for Xen DomU NixOS virtual machines.
+
+{ config, pkgs, ... }:
+
+{
+  # We're being booted using pv-grub, which means that we need to
+  # generate a GRUB 1 menu without actually installing GRUB.
+  boot.loader.grub.version = 1;
+  boot.loader.grub.device = "nodev";
+  boot.loader.grub.extraPerEntryConfig = "root (hd0)";
+
+  boot.initrd.kernelModules = [ "xen-blkfront" ];
+
+  # Backgrounds don't work, so don't bother.
+  services.ttyBackgrounds.enable = false;
+
+  # Send syslog messages to the Xen console.
+  services.syslogd.tty = "hvc0";
+
+  # Start a mingetty on the Xen console (so that you can login using
+  # "xm console" in Dom0). 
+  services.mingetty.ttys = [ "hvc0" "tty1" "tty2" ];
+}