Author: viric
Date: Tue Oct 19 20:45:35 2010
New Revision: 24370
URL: https://svn.nixos.org/websvn/nix/?rev=24370&sc=1

Log:
Updating from trunk. Blind commit - no coflicts.

Added:
   nixos/branches/stdenv-updates/modules/hardware/network/intel-2100bg.nix
      - copied unchanged from r24369, 
nixos/trunk/modules/hardware/network/intel-2100bg.nix
Modified:
   nixos/branches/stdenv-updates/   (props changed)
   nixos/branches/stdenv-updates/lib/test-driver/Machine.pm
   
nixos/branches/stdenv-updates/modules/installer/tools/nixos-deploy-network/deploy.nix
   
nixos/branches/stdenv-updates/modules/installer/tools/nixos-deploy-network/nixos-deploy-network.sh
   nixos/branches/stdenv-updates/modules/module-list.nix
   nixos/branches/stdenv-updates/modules/rename.nix
   nixos/branches/stdenv-updates/modules/services/networking/openvpn.nix
   nixos/branches/stdenv-updates/modules/services/networking/ssh/sshd.nix
   nixos/branches/stdenv-updates/modules/services/x11/desktop-managers/kde4.nix
   nixos/branches/stdenv-updates/modules/services/x11/desktop-managers/xfce.nix
   nixos/branches/stdenv-updates/modules/services/x11/display-managers/kdm.nix
   nixos/branches/stdenv-updates/modules/virtualisation/xen-dom0.nix
   nixos/branches/stdenv-updates/release.nix
   nixos/branches/stdenv-updates/tests/installer.nix
   nixos/branches/stdenv-updates/tests/quake3.nix

Modified: nixos/branches/stdenv-updates/lib/test-driver/Machine.pm
==============================================================================
--- nixos/branches/stdenv-updates/lib/test-driver/Machine.pm    Tue Oct 19 
17:27:31 2010        (r24369)
+++ nixos/branches/stdenv-updates/lib/test-driver/Machine.pm    Tue Oct 19 
20:45:35 2010        (r24370)
@@ -330,6 +330,12 @@
     }
 }
 
+sub startJob {
+    my ($self, $jobName) = @_;
+    $self->execute("initctl start $jobName");
+    my ($status, $out) = $self->execute("initctl status $jobName");
+    die "failed to start $jobName" unless $out =~ /start\/running/;
+}
 
 sub stopJob {
     my ($self, $jobName) = @_;

Copied: nixos/branches/stdenv-updates/modules/hardware/network/intel-2100bg.nix 
(from r24369, nixos/trunk/modules/hardware/network/intel-2100bg.nix)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixos/branches/stdenv-updates/modules/hardware/network/intel-2100bg.nix     
Tue Oct 19 20:45:35 2010        (r24370, copy of r24369, 
nixos/trunk/modules/hardware/network/intel-2100bg.nix)
@@ -0,0 +1,34 @@
+{pkgs, config, ...}:
+
+{
+
+  ###### interface
+
+  options = {
+  
+    networking.enableIntel2100BGFirmware = pkgs.lib.mkOption {
+      default = false;
+      type = pkgs.lib.types.bool;
+      description = ''
+        Turn on this option if you want firmware for the Intel
+        PRO/Wireless 2100BG to be loaded automatically.  This is
+        required if you want to use this device.  Intel requires you to
+        accept the license for this firmware, see
+        <link xlink:href='http://ipw2100.sourceforge.net/firmware.php?fid=2'/>.
+      '';
+    };
+
+  };
+
+
+  ###### implementation
+  
+  config = pkgs.lib.mkIf config.networking.enableIntel2100BGFirmware {
+  
+    # Warning: setting this option requires acceptance of the firmware
+    # license, see http://ipw2100.sourceforge.net/firmware.php?fid=2.
+    hardware.firmware = [ pkgs.ipw2100fw ];
+
+  };
+  
+}

Modified: 
nixos/branches/stdenv-updates/modules/installer/tools/nixos-deploy-network/deploy.nix
==============================================================================
--- 
nixos/branches/stdenv-updates/modules/installer/tools/nixos-deploy-network/deploy.nix
       Tue Oct 19 17:27:31 2010        (r24369)
+++ 
nixos/branches/stdenv-updates/modules/installer/tools/nixos-deploy-network/deploy.nix
       Tue Oct 19 20:45:35 2010        (r24370)
@@ -2,33 +2,71 @@
 , nixpkgs ? /etc/nixos/nixpkgs
 , networkExpr
 , infrastructureExpr
+, targetProperty ? "hostname"
 }:
 
 let
   pkgs = import nixpkgs {};
   
-  inherit (builtins) attrNames getAttr listToAttrs concatMapStrings;
+  inherit (builtins) attrNames getAttr listToAttrs;
+  inherit (pkgs.lib) concatMapStrings;
   
   network = import networkExpr;
   infrastructure = import infrastructureExpr;
- 
-  generateScript = network: infrastructure: configs:
+  
+  generateRollbackSucceededPhase = network: infrastructure: configs:
     concatMapStrings (configurationName: 
       let
         infrastructureElement = getAttr configurationName infrastructure;
        config = getAttr configurationName configs;
       in
       ''
-        echo "=== upgrading ${infrastructureElement.hostName} ==="
-        nix-copy-closure --to ${infrastructureElement.hostName} 
${config.system.build.toplevel} \
-        && ssh $NIX_SSHOPTS ${infrastructureElement.hostName} nix-env -p 
/nix/var/nix/profiles/system --set ${config.system.build.toplevel} \
-        && ssh $NIX_SSHOPTS ${infrastructureElement.hostName} 
${config.system.build.toplevel}/bin/switch-to-configuration switch \
-        && { succeeded=$((succeeded + 1)); } \
-        || { failed=$((failed + 1)); echo 'WARNING: upgrade of 
${infrastructureElement.hostName} failed!'; }
+        if [ "$rollback" != "$succeeded" ]
+       then
+           ssh $NIX_SSHOPTS ${getAttr targetProperty infrastructureElement} 
nix-env -p /nix/var/nix/profiles/system --rollback
+           ssh $NIX_SSHOPTS ${getAttr targetProperty infrastructureElement} 
/nix/var/nix/profiles/bin/switch-to-configuration switch
+           
+           rollback=$((rollback + 1))
+       fi
+      ''
+    ) (attrNames network)  
+  ;
+  
+  generateDistributionPhase = network: infrastructure: configs:
+    concatMapStrings (configurationName: 
+      let
+        infrastructureElement = getAttr configurationName infrastructure;
+       config = getAttr configurationName configs;
+      in
+      ''
+        echo "=== copy system closure to ${getAttr targetProperty 
infrastructureElement} ==="
+        nix-copy-closure --to ${getAttr targetProperty infrastructureElement} 
${config.system.build.toplevel}
       ''
     ) (attrNames network)
   ;
-
+  
+  generateActivationPhase = network: infrastructure: configs:
+    concatMapStrings (configurationName: 
+      let
+        infrastructureElement = getAttr configurationName infrastructure;
+       config = getAttr configurationName configs;
+      in
+      ''
+        echo "=== activating system configuration on ${getAttr targetProperty 
infrastructureElement} ==="
+       ssh $NIX_SSHOPTS ${getAttr targetProperty infrastructureElement} 
nix-env -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel} 
|| 
+         (ssh $NIX_SSHOPTS ${getAttr targetProperty infrastructureElement} 
nix-env -p /nix/var/nix/profiles/system --rollback; rollbackSucceeded)
+       
+        ssh $NIX_SSHOPTS ${getAttr targetProperty infrastructureElement} 
/nix/var/nix/profiles/bin/switch-to-configuration switch ||
+         ( ssh $NIX_SSHOPTS ${getAttr targetProperty infrastructureElement} 
nix-env -p /nix/var/nix/profiles/system --rollback
+           ssh $NIX_SSHOPTS ${getAttr targetProperty infrastructureElement} 
/nix/var/nix/profiles/bin/switch-to-configuration switch
+           rollbackSucceeded
+         )
+       
+       succeeded=$((succeeded + 1))
+      ''
+    ) (attrNames network)
+  ;
+  
   evaluateMachines = network: infrastructure:
     listToAttrs (map (configurationName:
       let
@@ -48,13 +86,27 @@
 in
 pkgs.stdenv.mkDerivation {
   name = "deploy-script";
-  buildCommand = ''
+  buildCommand = 
+  ''
     ensureDir $out/bin
     cat > $out/bin/deploy-systems << "EOF"
     #! ${pkgs.stdenv.shell} -e
-    failed=0; succeeded=0
-    ${generateScript network infrastructure configs}
-    echo "Upgrade of $failed machines failed, $succeeded machines succeeded.";
+    
+    rollbackSucceeded()
+    {
+        rollback=0
+        ${generateRollbackSucceededPhase network infrastructure configs}
+    }
+    
+    # Distribution phase
+    
+    ${generateDistributionPhase network infrastructure configs}
+    
+    # Activation phase
+    
+    succeeded=0
+    
+    ${generateActivationPhase network infrastructure configs}
     EOF
     chmod +x $out/bin/deploy-systems
   '';

Modified: 
nixos/branches/stdenv-updates/modules/installer/tools/nixos-deploy-network/nixos-deploy-network.sh
==============================================================================
--- 
nixos/branches/stdenv-updates/modules/installer/tools/nixos-deploy-network/nixos-deploy-network.sh
  Tue Oct 19 17:27:31 2010        (r24369)
+++ 
nixos/branches/stdenv-updates/modules/installer/tools/nixos-deploy-network/nixos-deploy-network.sh
  Tue Oct 19 20:45:35 2010        (r24370)
@@ -68,6 +68,6 @@
 
 # Deploy the network
 
-nix-build $NIXOS/deploy.nix --argstr networkExpr $networkExpr --argstr 
infrastructureExpr $infrastructureExpr $showTraceArg
+nix-build $NIXOS/modules/installer/tools/nixos-deploy-network/deploy.nix 
--argstr networkExpr $networkExpr --argstr infrastructureExpr 
$infrastructureExpr $showTraceArg
 ./result/bin/deploy-systems
 rm -f result

Modified: nixos/branches/stdenv-updates/modules/module-list.nix
==============================================================================
--- nixos/branches/stdenv-updates/modules/module-list.nix       Tue Oct 19 
17:27:31 2010        (r24369)
+++ nixos/branches/stdenv-updates/modules/module-list.nix       Tue Oct 19 
20:45:35 2010        (r24370)
@@ -12,6 +12,7 @@
   ./config/timezone.nix
   ./config/unix-odbc-drivers.nix
   ./config/users-groups.nix
+  ./hardware/network/intel-2100bg.nix
   ./hardware/network/intel-2200bg.nix
   ./hardware/network/intel-3945abg.nix
   ./hardware/network/rt73.nix 

Modified: nixos/branches/stdenv-updates/modules/rename.nix
==============================================================================
--- nixos/branches/stdenv-updates/modules/rename.nix    Tue Oct 19 17:27:31 
2010        (r24369)
+++ nixos/branches/stdenv-updates/modules/rename.nix    Tue Oct 19 20:45:35 
2010        (r24370)
@@ -1,8 +1,6 @@
 {pkgs, options, config, ...}:
 
-
 let
-  to = throw "This is just a dummy keyword";
 
   alias = from: to: {
     name = "Alias";
@@ -29,10 +27,16 @@
 
   zipModules = list: with pkgs.lib;
     zip (n: v:
-      if tail v != [] then zipModules v else head v
+      if tail v != [] then
+        if n == "_type" then builtins.trace "Merge _type" (head v)
+        else if n == "extraConfigs" then builtins.trace "Merge extraConfigs" 
(concatLists v)
+        else if n == "description" || n == "apply" then
+          abort "Cannot rename an option to multiple options."
+        else zipModules v
+      else head v
     ) list;
 
-  rename = statusTemplate: from: keyword: to: with pkgs.lib;
+  rename = statusTemplate: from: to: with pkgs.lib;
     let
       status = statusTemplate from to;
       setTo = setAttrByPath (splitString "." to);
@@ -60,30 +64,30 @@
 in zipModules ([]
 
 # usage example:
-# ++ rename alias "services.xserver.slim.theme" to 
"services.xserver.displayManager.slim.theme"
-++ rename obsolete "environment.extraPackages" to "environment.systemPackages"
+# ++ rename alias "services.xserver.slim.theme" 
"services.xserver.displayManager.slim.theme"
+++ rename obsolete "environment.extraPackages" "environment.systemPackages"
 
 # Old Grub-related options.
-++ rename obsolete "boot.copyKernels" to "boot.loader.grub.copyKernels"
-++ rename obsolete "boot.extraGrubEntries" to "boot.loader.grub.extraEntries"
-++ rename obsolete "boot.extraGrubEntriesBeforeNixos" to 
"boot.loader.grub.extraEntriesBeforeNixOS"
-++ rename obsolete "boot.grubDevice" to "boot.loader.grub.device"
-++ rename obsolete "boot.bootMount" to "boot.loader.grub.bootDevice"
-++ rename obsolete "boot.grubSplashImage" to "boot.loader.grub.splashImage"
+++ rename obsolete "boot.copyKernels" "boot.loader.grub.copyKernels"
+++ rename obsolete "boot.extraGrubEntries" "boot.loader.grub.extraEntries"
+++ rename obsolete "boot.extraGrubEntriesBeforeNixos" 
"boot.loader.grub.extraEntriesBeforeNixOS"
+++ rename obsolete "boot.grubDevice" "boot.loader.grub.device"
+++ rename obsolete "boot.bootMount" "boot.loader.grub.bootDevice"
+++ rename obsolete "boot.grubSplashImage" "boot.loader.grub.splashImage"
 
-++ rename obsolete "boot.initrd.extraKernelModules" to 
"boot.initrd.kernelModules"
+++ rename obsolete "boot.initrd.extraKernelModules" "boot.initrd.kernelModules"
 
 # OpenSSH
-++ rename obsolete "services.sshd.ports" to "services.openssh.ports"
-++ rename obsolete "services.sshd.enable" to "services.openssh.enable"
-++ rename obsolete "services.sshd.allowSFTP" to "services.openssh.allowSFTP"
-++ rename obsolete "services.sshd.forwardX11" to "services.openssh.forwardX11"
-++ rename obsolete "services.sshd.gatewayPorts" to 
"services.openssh.gatewayPorts"
-++ rename obsolete "services.sshd.permitRootLogin" to 
"services.openssh.permitRootLogin"
-++ rename obsolete "services.xserver.startSSHAgent" to 
"services.xserver.startOpenSSHAgent"
+++ rename obsolete "services.sshd.ports" "services.openssh.ports"
+++ rename obsolete "services.sshd.enable" "services.openssh.enable"
+++ rename obsolete "services.sshd.allowSFTP" "services.openssh.allowSFTP"
+++ rename obsolete "services.sshd.forwardX11" "services.openssh.forwardX11"
+++ rename obsolete "services.sshd.gatewayPorts" "services.openssh.gatewayPorts"
+++ rename obsolete "services.sshd.permitRootLogin" 
"services.openssh.permitRootLogin"
+++ rename obsolete "services.xserver.startSSHAgent" 
"services.xserver.startOpenSSHAgent"
 
 # KDE
-++ rename deprecated "kde.extraPackages" to "environment.kdePackages"
-
+++ rename deprecated "kde.extraPackages" "environment.kdePackages"
+# ++ rename obsolete "environment.kdePackages" "environment.systemPackages" # 
!!! doesn't work!
 
 ) # do not add renaming after this.

Modified: nixos/branches/stdenv-updates/modules/services/networking/openvpn.nix
==============================================================================
--- nixos/branches/stdenv-updates/modules/services/networking/openvpn.nix       
Tue Oct 19 17:27:31 2010        (r24369)
+++ nixos/branches/stdenv-updates/modules/services/networking/openvpn.nix       
Tue Oct 19 20:45:35 2010        (r24370)
@@ -155,7 +155,11 @@
   ###### implementation
 
   config = mkIf cfg.enable {
+
     jobs = listToAttrs (mapAttrsFlatten (name: value: nameValuePair 
"openvpn-${name}" (makeOpenVPNJob value name)) cfg.servers);
+
+    environment.systemPackages = [ openvpn ];
+
   };
   
 }

Modified: nixos/branches/stdenv-updates/modules/services/networking/ssh/sshd.nix
==============================================================================
--- nixos/branches/stdenv-updates/modules/services/networking/ssh/sshd.nix      
Tue Oct 19 17:27:31 2010        (r24369)
+++ nixos/branches/stdenv-updates/modules/services/networking/ssh/sshd.nix      
Tue Oct 19 20:45:35 2010        (r24370)
@@ -8,31 +8,6 @@
 
   nssModulesPath = config.system.nssModules.path;
 
-  sshdConfig = pkgs.writeText "sshd_config"
-    ''
-      Protocol 2
-
-      UsePAM yes
-
-      ${ concatMapStrings (port : ''Port ${toString port}
-                                           '') cfg.ports}
-
-      ${if cfg.forwardX11 then "
-        X11Forwarding yes
-        XAuthLocation ${pkgs.xlibs.xauth}/bin/xauth
-      " else "
-        X11Forwarding no
-      "}
-
-      ${if cfg.allowSFTP then "
-        Subsystem sftp ${pkgs.openssh}/libexec/sftp-server
-      " else "
-      "}
-
-      PermitRootLogin ${cfg.permitRootLogin}
-      GatewayPorts ${cfg.gatewayPorts}
-    '';
-
   permitRootLoginCheck = v:
     v == "yes" ||
     v == "without-password" ||
@@ -102,6 +77,11 @@
         '';
       };
       
+      extraConfig = mkOption {
+        default = "";
+        description = "Verbatim contents of <filename>sshd_config</filename>.";
+      };
+      
     };
 
   };
@@ -146,10 +126,40 @@
 
         daemonType = "fork";
 
-        exec = "${pkgs.openssh}/sbin/sshd -h /etc/ssh/ssh_host_dsa_key -f 
${sshdConfig}";
+        exec = 
+          ''
+            ${pkgs.openssh}/sbin/sshd -h /etc/ssh/ssh_host_dsa_key \
+              -f ${pkgs.writeText "sshd_config" cfg.extraConfig}
+          '';
       };
 
     networking.firewall.allowedTCPPorts = cfg.ports;
+
+    services.openssh.extraConfig =
+      ''
+        Protocol 2
+
+        UsePAM yes
+
+        ${concatMapStrings (port: ''
+          Port ${toString port}
+        '') cfg.ports}
+
+        ${if cfg.forwardX11 then ''
+          X11Forwarding yes
+          XAuthLocation ${pkgs.xlibs.xauth}/bin/xauth
+        '' else ''
+          X11Forwarding no
+        ''}
+
+        ${optionalString cfg.allowSFTP ''
+          Subsystem sftp ${pkgs.openssh}/libexec/sftp-server
+        ''}
+
+        PermitRootLogin ${cfg.permitRootLogin}
+        GatewayPorts ${cfg.gatewayPorts}
+      '';
+
   };
 
 }

Modified: 
nixos/branches/stdenv-updates/modules/services/x11/desktop-managers/kde4.nix
==============================================================================
--- 
nixos/branches/stdenv-updates/modules/services/x11/desktop-managers/kde4.nix    
    Tue Oct 19 17:27:31 2010        (r24369)
+++ 
nixos/branches/stdenv-updates/modules/services/x11/desktop-managers/kde4.nix    
    Tue Oct 19 20:45:35 2010        (r24370)
@@ -23,7 +23,7 @@
       default = [];
       example = [ pkgs.kde4.kdesdk ];
       type = types.list types.package;
-      description = "Additional KDE 4 programs. Only a minimal set is 
installed by default.";
+      description = "This option is obsolete.  Please use 
<option>environment.systemPackages</option> instead.";
     };
 
   };
@@ -56,7 +56,7 @@
     } ];
 
     environment = {
-      kdePackages = [
+      systemPackages = [
         pkgs.kde4.kdelibs
         pkgs.kde4.kdebase
         pkgs.kde4.kdebase_runtime
@@ -69,9 +69,7 @@
         pkgs.gst_all.gstPluginsGood
         xorg.xmessage # so that startkde can show error messages
         xorg.xset # used by startkde, non-essential
-      ];
-
-      x11Packages = config.environment.kdePackages;
+      ] ++ config.environment.kdePackages;
 
       pathsToLink = [ "/share" ];
 

Modified: 
nixos/branches/stdenv-updates/modules/services/x11/desktop-managers/xfce.nix
==============================================================================
--- 
nixos/branches/stdenv-updates/modules/services/x11/desktop-managers/xfce.nix    
    Tue Oct 19 17:27:31 2010        (r24369)
+++ 
nixos/branches/stdenv-updates/modules/services/x11/desktop-managers/xfce.nix    
    Tue Oct 19 20:45:35 2010        (r24370)
@@ -33,7 +33,11 @@
             
             # Set GTK_DATA_PREFIX so that GTK+ can find the Xfce themes.
             export GTK_DATA_PREFIX=${config.system.path}
-            
+
+            # Necessary to get xfce4-mixer to find GST's ALSA plugin.
+            # Ugly.
+            export GST_PLUGIN_PATH=${config.system.path}/lib
+
             exec ${pkgs.stdenv.shell} 
${pkgs.xfce.xfceutils}/etc/xdg/xfce4/xinitrc
           '';
       };
@@ -55,6 +59,7 @@
         pkgs.xfce.xfce4panel
         pkgs.xfce.xfce4session
         pkgs.xfce.xfce4settings
+        pkgs.xfce.xfce4mixer
         pkgs.xfce.xfceutils
         pkgs.xfce.xfconf
         pkgs.xfce.xfdesktop

Modified: 
nixos/branches/stdenv-updates/modules/services/x11/display-managers/kdm.nix
==============================================================================
--- nixos/branches/stdenv-updates/modules/services/x11/display-managers/kdm.nix 
Tue Oct 19 17:27:31 2010        (r24369)
+++ nixos/branches/stdenv-updates/modules/services/x11/display-managers/kdm.nix 
Tue Oct 19 20:45:35 2010        (r24370)
@@ -100,7 +100,7 @@
     services.xserver.displayManager.job =
       { execCmd =
           (optionalString (config.system.boot.loader.id == "grub") 
"PATH=${config.system.build.grub}/sbin:$PATH ") +
-          "exec ${kdebase_workspace}/bin/kdm -config ${kdmrc} -nodaemon";
+          "KDEDIRS=${kdebase_workspace} exec ${kdebase_workspace}/bin/kdm 
-config ${kdmrc} -nodaemon";
         logsXsession = true;
       };
 

Modified: nixos/branches/stdenv-updates/modules/virtualisation/xen-dom0.nix
==============================================================================
--- nixos/branches/stdenv-updates/modules/virtualisation/xen-dom0.nix   Tue Oct 
19 17:27:31 2010        (r24369)
+++ nixos/branches/stdenv-updates/modules/virtualisation/xen-dom0.nix   Tue Oct 
19 20:45:35 2010        (r24370)
@@ -72,7 +72,7 @@
 
     boot.kernelModules = 
       [ "xen_evtchn" "xen_gntdev" "xen_blkback" "xen_netback" "xen_pciback" 
-        "blktap" "tap"
+        "blktap" "tun"
       ];
 
     # The radeonfb kernel module causes the screen to go black as soon

Modified: nixos/branches/stdenv-updates/release.nix
==============================================================================
--- nixos/branches/stdenv-updates/release.nix   Tue Oct 19 17:27:31 2010        
(r24369)
+++ nixos/branches/stdenv-updates/release.nix   Tue Oct 19 20:45:35 2010        
(r24370)
@@ -159,12 +159,14 @@
           system = "i686-linux";
         };
       in {
+        avahi = t.avahi.test;
         bittorrent = t.bittorrent.test;
         firefox = t.firefox.test;
         installer.lvm = t.installer.lvm.test;
         installer.separateBoot = t.installer.separateBoot.test;
         installer.simple = t.installer.simple.test;
         installer.swraid = t.installer.swraid.test;
+        installer.rebuildCD = t.installer.rebuildCD.test;
         kde4 = t.kde4.test;
         login = t.login.test;
         nat = t.nat.test;

Modified: nixos/branches/stdenv-updates/tests/installer.nix
==============================================================================
--- nixos/branches/stdenv-updates/tests/installer.nix   Tue Oct 19 17:27:31 
2010        (r24369)
+++ nixos/branches/stdenv-updates/tests/installer.nix   Tue Oct 19 20:45:35 
2010        (r24370)
@@ -302,37 +302,31 @@
     { inherit iso;
       nodes = { };
       testScript =
-    ''
-      # damn, it's costly to evaluate nixos-rebuild (1G of ram)
-      my $machine = Machine->new({ cdrom => glob("${iso}/iso/*.iso"), 
qemuFlags => '${qemuNICFlags 1 1} -m 1024' });
-      $machine->start;
-      
-      # Make sure that we get a login prompt etc.
-      $machine->mustSucceed("echo hello");
-      $machine->waitForJob("tty1");
-      $machine->waitForJob("rogue");
-      $machine->waitForJob("nixos-manual");
-
-      # Make sure that we don't try to download anything.
-      $machine->stopJob("dhclient");
-      $machine->mustSucceed("rm /etc/resolv.conf");
-
-      # Enable sshd service.
-      $machine->mustSucceed(
-        "sed -i 's,^}\$,jobs.sshd.startOn = pkgs.lib.mkOverride 0 \"startup\"; 
},' /etc/nixos/configuration.nix"
-      );
-
-      my $cfg = $machine->mustSucceed("cat /etc/nixos/configuration.nix");
-      print STDERR "New CD config:\n$cfg\n";
-
-      # Apply the new CD configuration.
-      $machine->mustSucceed("nixos-rebuild test --no-pull");
-
-      # Connect to it-self.
-      #$machine->waitForJob("sshd");
-      #$machine->mustSucceed("ssh [email protected] echo hello");
+        ''
+          # damn, it's costly to evaluate nixos-rebuild (1G of ram)
+          my $machine = Machine->new({ cdrom => glob("${iso}/iso/*.iso"), 
qemuFlags => '${qemuNICFlags 1 1} -m 1024' });
+          $machine->start;
+
+          # Make sure that we don't try to download anything.
+          $machine->stopJob("dhclient");
+          $machine->mustSucceed("rm /etc/resolv.conf");
+
+          # Enable sshd service.
+          $machine->mustSucceed(
+            "sed -i 's,^}\$,jobs.sshd.startOn = pkgs.lib.mkOverride 0 
\"startup\"; },' /etc/nixos/configuration.nix"
+          );
+
+          my $cfg = $machine->mustSucceed("cat /etc/nixos/configuration.nix");
+          print STDERR "New CD config:\n$cfg\n";
+
+          # Apply the new CD configuration.
+          $machine->mustSucceed("nixos-rebuild test --no-pull");
+
+          # Connect to it-self.
+          #$machine->waitForJob("sshd");
+          #$machine->mustSucceed("ssh [email protected] echo hello");
 
-      $machine->shutdown;
-    '';
+          $machine->shutdown;
+        '';
     };
 }

Modified: nixos/branches/stdenv-updates/tests/quake3.nix
==============================================================================
--- nixos/branches/stdenv-updates/tests/quake3.nix      Tue Oct 19 17:27:31 
2010        (r24369)
+++ nixos/branches/stdenv-updates/tests/quake3.nix      Tue Oct 19 20:45:35 
2010        (r24370)
@@ -7,8 +7,8 @@
 
     { require = [ ./common/x11.nix ];
       services.xserver.driSupport = true;
-      services.xserver.defaultDepth = pkgs.lib.mkOverrideTemplate 0 {} 16;
-      environment.systemPackages = [ pkgs.icewm pkgs.quake3demo ];
+      services.xserver.defaultDepth = pkgs.lib.mkOverride 0 16;
+      environment.systemPackages = [ pkgs.quake3demo ];
     };
 
   nodes =
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to