Google Compute image: fix punctuation in description, give disk image proper name with version and revision.

This commit is contained in:
Rob Vermaas 2013-12-12 12:48:09 +01:00
parent 8c2dd86fe2
commit 61d346eaaf

View File

@ -11,7 +11,7 @@ with pkgs.lib;
{ preVM = { preVM =
'' ''
mkdir $out mkdir $out
diskImage=$out/disk.raw diskImage=$out/$diskImageBase
truncate $diskImage --size 10G truncate $diskImage --size 10G
mv closure xchg/ mv closure xchg/
''; '';
@ -20,11 +20,11 @@ with pkgs.lib;
'' ''
PATH=$PATH:${pkgs.gnutar}/bin:${pkgs.gzip}/bin PATH=$PATH:${pkgs.gnutar}/bin:${pkgs.gzip}/bin
pushd $out pushd $out
tar -Szcf disk.raw.tar.gz disk.raw tar -Szcf $diskImageBase.tar.gz $diskImageBase
rm $out/disk.raw rm $out/$diskImageBase
popd popd
''; '';
diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
buildInputs = [ pkgs.utillinux pkgs.perl ]; buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph = exportReferencesGraph =
[ "closure" config.system.build.toplevel ]; [ "closure" config.system.build.toplevel ];
@ -121,9 +121,8 @@ with pkgs.lib;
169.254.169.254 metadata.google.internal metadata 169.254.169.254 metadata.google.internal metadata
''; '';
# fetch authorized keys for root user
systemd.services.fetch-root-authorized-keys = systemd.services.fetch-root-authorized-keys =
{ description = "Fetch authorized_keys for root user."; { description = "Fetch authorized_keys for root user";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
before = [ "sshd.service" ]; before = [ "sshd.service" ];