about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorThomas Strobel <ts468@cam.ac.uk>2015-06-08 19:56:37 +0200
committerRok Garbas <rok@garbas.si>2015-06-12 12:52:14 +0200
commita6e12c23fcb5890e44094b95a91ddb6c3e9cc081 (patch)
treea3ecf2b2f6c9556938cba71b2816fae719d1fcf7 /nixos
parent36a1d2d4f8c74a58ca6c56b7d768753c0dac0752 (diff)
downloadnixlib-a6e12c23fcb5890e44094b95a91ddb6c3e9cc081.tar
nixlib-a6e12c23fcb5890e44094b95a91ddb6c3e9cc081.tar.gz
nixlib-a6e12c23fcb5890e44094b95a91ddb6c3e9cc081.tar.bz2
nixlib-a6e12c23fcb5890e44094b95a91ddb6c3e9cc081.tar.lz
nixlib-a6e12c23fcb5890e44094b95a91ddb6c3e9cc081.tar.xz
nixlib-a6e12c23fcb5890e44094b95a91ddb6c3e9cc081.tar.zst
nixlib-a6e12c23fcb5890e44094b95a91ddb6c3e9cc081.zip
Link Xen scripts to /etc/xen
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/xen-dom0.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix
index ea9f61aad6a6..65efdabb3b4b 100644
--- a/nixos/modules/virtualisation/xen-dom0.nix
+++ b/nixos/modules/virtualisation/xen-dom0.nix
@@ -6,7 +6,6 @@ with lib;
 
 let
   cfg = config.virtualisation.xen;
-  xen = pkgs.xen;
 in
 
 {
@@ -88,9 +87,9 @@ in
       message = "Xen currently does not support EFI boot";
     } ];
 
-    virtualisation.xen.stored = mkDefault "${xen}/bin/oxenstored";
+    virtualisation.xen.stored = mkDefault "${pkgs.xen}/bin/oxenstored";
 
-    environment.systemPackages = [ xen ];
+    environment.systemPackages = [ pkgs.xen ];
 
     # Make sure Domain 0 gets the required configuration
     #boot.kernelPackages = pkgs.boot.kernelPackages.override { features={xen_dom0=true;}; };
@@ -122,7 +121,7 @@ in
 
     system.extraSystemBuilderCmds =
       ''
-        ln -s ${xen}/boot/xen.gz $out/xen.gz
+        ln -s ${pkgs.xen}/boot/xen.gz $out/xen.gz
         echo "${toString cfg.bootParams}" > $out/xen-params
       '';
 
@@ -158,13 +157,16 @@ in
 
 
     environment.etc =
-      [ { source = "${xen}/etc/xen/xl.conf";
+      [ { source = "${pkgs.xen}/etc/xen/xl.conf";
           target = "xen/xl.conf";
         }
+        { source = "${pkgs.xen}/etc/xen/scripts";
+          target = "xen/scripts";
+        }
       ];
 
     # Xen provides udev rules.
-    services.udev.packages = [ xen ];
+    services.udev.packages = [ pkgs.xen ];
 
     services.udev.path = [ pkgs.bridge-utils pkgs.iproute ];