summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRichard Zetterberg <richard.zetterberg@googlemail.com>2015-05-17 20:55:07 +0200
committerRichard Zetterberg <richard.zetterberg@googlemail.com>2015-05-17 20:55:07 +0200
commitbd5011fc34e20b7bf15970b29496e6406ee2bcff (patch)
treefca1acb5ab12e7de5a533f8cfda8d8a7113b0743 /nixos
parent3a966376bf610083da36ba312eb8cdae46de6af5 (diff)
downloadnixpkgs-bd5011fc34e20b7bf15970b29496e6406ee2bcff.tar
nixpkgs-bd5011fc34e20b7bf15970b29496e6406ee2bcff.tar.gz
nixpkgs-bd5011fc34e20b7bf15970b29496e6406ee2bcff.tar.bz2
nixpkgs-bd5011fc34e20b7bf15970b29496e6406ee2bcff.tar.lz
nixpkgs-bd5011fc34e20b7bf15970b29496e6406ee2bcff.tar.xz
nixpkgs-bd5011fc34e20b7bf15970b29496e6406ee2bcff.tar.zst
nixpkgs-bd5011fc34e20b7bf15970b29496e6406ee2bcff.zip
Fixes eval and build error of nova image builder
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/nova-image.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/nova-image.nix b/nixos/modules/virtualisation/nova-image.nix
index 2523dacc0b5..9738552774d 100644
--- a/nixos/modules/virtualisation/nova-image.nix
+++ b/nixos/modules/virtualisation/nova-image.nix
@@ -46,16 +46,20 @@ with lib;
 
           # Register the paths in the Nix database.
           printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
-              chroot /mnt ${config.nix.package}/bin/nix-store --load-db
+              chroot /mnt ${config.nix.package}/bin/nix-store --load-db --option build-users-group ""
 
           # Create the system profile to allow nixos-rebuild to work.
-          chroot /mnt ${config.nix.package}/bin/nix-env \
+          chroot /mnt ${config.nix.package}/bin/nix-env --option build-users-group "" \
               -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel}
 
           # `nixos-rebuild' requires an /etc/NIXOS.
           mkdir -p /mnt/etc
           touch /mnt/etc/NIXOS
 
+          # `switch-to-configuration' requires a /bin/sh
+          mkdir -p /mnt/bin
+          ln -s ${config.system.build.binsh}/bin/sh /mnt/bin/sh
+
           # Install a configuration.nix.
           mkdir -p /mnt/etc/nixos
           cp ${./nova-config.nix} /mnt/etc/nixos/configuration.nix
@@ -106,7 +110,6 @@ with lib;
 
   # Since Nova allows VNC access to instances, it's nice to start to
   # start a few virtual consoles.
-  services.mingetty.ttys = [ "tty1" "tty2" ];
 
   # Allow root logins only using the SSH key that the user specified
   # at instance creation time.