nixos: rename some outputs for better discoverability in /nix/store

This commit is contained in:
Jan Malakhovski 2015-09-18 16:17:22 +00:00
parent c8ea6c07c6
commit a153de28bb
5 changed files with 7 additions and 5 deletions

View file

@ -99,7 +99,9 @@ let
# makes it bootable.
baseSystem = showWarnings (
if [] == failed then pkgs.stdenv.mkDerivation {
name = "nixos-${config.system.nixosVersion}";
name = let hn = config.networking.hostName;
nn = if (hn != "") then hn else "unnamed";
in "nixos-system-${nn}-${config.system.nixosVersion}";
preferLocalBuild = true;
allowSubstitutes = false;
buildCommand = systemBuilder;

View file

@ -26,7 +26,7 @@ in
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc $diskImage $out/disk.vhd
rm $diskImage
'';
diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
diskImageBase = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph =
[ "closure" config.system.build.toplevel ];

View file

@ -26,7 +26,7 @@ in
rm $diskImageBase
popd
'';
diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
diskImageBase = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph =
[ "closure" config.system.build.toplevel ];

View file

@ -30,7 +30,7 @@ in
rm $out/disk.raw
popd
'';
diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
diskImageBase = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph =
[ "closure" config.system.build.toplevel ];

View file

@ -101,7 +101,7 @@ in {
system.build.virtualBoxOVA = pkgs.runCommand "virtualbox-ova"
{ buildInputs = [ pkgs.linuxPackages.virtualbox ];
vmName = "NixOS ${config.system.nixosVersion} (${pkgs.stdenv.system})";
fileName = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.ova";
fileName = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.ova";
}
''
echo "creating VirtualBox VM..."