* EBS creator: use the NixOS channel.
svn path=/nixos/trunk/; revision=34119
This commit is contained in:
parent
dbf5e3229e
commit
28cc602751
@ -51,13 +51,13 @@ m.run_command("mkdir -p /mnt")
|
|||||||
m.run_command("mount {0} /mnt".format(device))
|
m.run_command("mount {0} /mnt".format(device))
|
||||||
m.run_command("touch /mnt/.ebs")
|
m.run_command("touch /mnt/.ebs")
|
||||||
m.run_command("mkdir -p /mnt/etc/nixos")
|
m.run_command("mkdir -p /mnt/etc/nixos")
|
||||||
m.run_command("nixos-checkout") # FIXME
|
m.run_command("nix-channel --add http://nixos.org/releases/nixos/channels/nixos-unstable")
|
||||||
m.run_command("cp -f /etc/nixos/nixos/modules/virtualisation/amazon-config.nix /mnt/etc/nixos/configuration.nix")
|
m.run_command("nix-channel --update")
|
||||||
m.run_command("echo -n pre$(svnversion -c /etc/nixos/nixos | sed 's/.*://')-$(svnversion -c /etc/nixos/nixpkgs | sed 's/.*://') > /etc/nixos/nixos/.version-suffix")
|
m.run_command("nixos-rebuild switch")
|
||||||
version = m.run_command("nixos-option system.nixosVersion", capture_stdout=True).replace('"', '').rstrip()
|
version = m.run_command("nixos-version", capture_stdout=True).replace('"', '').rstrip()
|
||||||
print >> sys.stderr, "NixOS version is {0}".format(version)
|
print >> sys.stderr, "NixOS version is {0}".format(version)
|
||||||
|
m.run_command("cp -f $(nix-instantiate --find-file nixos/modules/virtualisation/amazon-config.nix) /mnt/etc/nixos/configuration.nix")
|
||||||
m.run_command("nixos-install")
|
m.run_command("nixos-install")
|
||||||
m.run_command("rm -rf /mnt/etc/nixos/nixos/.svn /mnt/etc/nixos/nixpkgs/.svn")
|
|
||||||
if args.hvm:
|
if args.hvm:
|
||||||
m.run_command('cp /nix/store/*-grub-0.97*/lib/grub/i386-pc/* /mnt/boot/grub')
|
m.run_command('cp /nix/store/*-grub-0.97*/lib/grub/i386-pc/* /mnt/boot/grub')
|
||||||
m.run_command('sed -i "s|hd0|hd0,0|" /mnt/boot/grub/menu.lst')
|
m.run_command('sed -i "s|hd0|hd0,0|" /mnt/boot/grub/menu.lst')
|
||||||
|
Loading…
Reference in New Issue
Block a user